Skip to content

noteinabottle1/ao3-crossposting-helper

 
 

Repository files navigation

AO3 Cross Posting Helper

Fork of this project: ao3-podfic-posting-helper

We'd like to acknowledge ao3-podfic-posting-helper for giving a great foundation for us to build additional functionality. Please check out that action if you think it better suits your needs.

AO3 Cross Posting Helper

Logo: A AO3 icon with a decentralized icon in the O

This extension can help you crosspost a new work in between Ao3 and Ao3 clones such as Squidgeworld.

This is an unofficial extension and not supported by AO3 or Squidgeworld. Please do not raise issues with this extension to AO3 or Squidegworld support.

Available on the Chrome Web Store

Available as a Firefox Add-on

You can configure it to:

  • Automatically add the "Cross-Posted from AO3" tag
  • Apply a transformation to the original title, such as adding the prefix "[Ao3 Crosspost] "
  • Apply a transformation to the original summary, such as wrapping it in a blockquote and linking to the original work

A popup over the new work page, showing the options available to configure importing metadata

If the default set of title transformations isn't enough, you can configure a custom format on the options page. "${title}" will be replaced with the original title and "${authors}" with the original authors.

For example, if the original work is called "Super awesome title" and is by "author1" and "author2":

  • "${title}" will give you "Super awesome title"
  • "[Cross-Posted from AO3] ${title}" will give you "[Cross-Posted from AO3] Super awesome title"
  • "crosspost of ${title} by ${authors}" will give you "crosspost of Super awesome title by author1, author2"

An options page where you can configure a custom title transformation

If the default set of summary transformations isn't enough, you can configure a custom format on the options page. The following replacements will be made:

  • ${blocksummary}: The summary of the original work wrapped in a blockquote. Because of the way ao3 handles block quotes, you should put whatever you want to follow this on the same line.
  • ${summary}:The summary of the original work.
  • ${title}: The title of the original work. This will be a link to the original work.
  • ${authors}: A comma-separated list of the authors of the original work. Each author is a link to their AO3 page.

An options page where you can configure a custom summary transformation

You can also configure a custom default body for your work, instead of a default which demonstrates how to embed audio, images, or links.

Documentation

A lot of the basic structure of this app (popup page/option page/background loader) was built directly on the Chrome extension getting started tutorial.

popup.js

The core importing logic that gets the metadata from the original work, and the filling logic, to enter it into AO3's new work form. There's also some logic here to save pop-up options when a user hits import, so that they'll be the same next time.

Storing options

The only way to pass information between the form fields in the pop-up and the injected html that fills in the "new work" form is to write it to storage and then read it back. That's what the browser.storage.sync.set/get calls do.

Code design

The pop-up and options page are built using Material Design Components for Web. We are using the web components without a framework and with barebones CSS. The JS and CSS files for the components were downloaded from CDN and are packed in source here. We didn't set up any kind of package management with Node or any bundling with tools like Webpack on account of these being more effort than we were willing to invest right now. Code is organized as ES6 modules where possible.

About

Cross posting Ao3 works

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.9%
  • HTML 41.2%
  • CSS 2.8%
  • Shell 0.1%