Home | Schedule & Readings | Links & Resources

Radical Software

LCST 2234, Fall 2021 (CRN 9430)
Rory Solomon

Project 2, Tutorial 4: Publishing

Plan for today:

  1. Debugging the use of options (the work from last week)
  2. Publishing an extension
  3. Questions!

Debugging the use of options

> Make sure to clear errors after you read them, otherwise they won't go away and they'll confuse you next time.

> Fix the problem in options.html by moving the <script> to after <body>:

    </div>
  </body>
  <script src="options.js"></script>
</html>
    

> Use the console for debugging.

Control-click (or right-click) to select "Inspect", and select the "Console" tab:

This will show you any errors that are occurring. Note that some of these errors may be caused by "you" (by Javascript code in your browser extension) and some may be caused by other Javascript code running on the page (i.e., code in files from the website itself). With a browser extension, your code is intermingling and interacting with the "official" code from the publisher of the site. Think about what this means for the authority of authorship and radical software.

console.log("in here ...");

Sometimes if testing on bigger pages (with more Javascript and more messages already in the console) your message may get lost. You can make it stand out with some extra characters. This is a little cheesy, but it works. Remember that \n is the control character that signifies newline and it will create a linebreak.

console.log("\n\n\n *** in here ....\n\n\n");

> Testing my text replacement extension on a bigger site (like nytimes.com, I was finding that using "run_at": "document_end" in my manifest.json file was giving me problems. The text replacement was happening, but then being overridden — probably by some other Javascript code running on the site.

In experimenting, I found that "run_at": "document_idle" was working better.

II. Publishing an extension

The first step is submitted the extension for review. (I need to clean up these notes. -Rory)

    "Publish in the Chrome Web Store", instructions here:
    https://developer.chrome.com/docs/webstore/publish/

    "group publisher", here:
    https://developer.chrome.com/docs/webstore/group-publishers/


    Created a new email address
    (Radical Software, radicalsoftwareclassdev@gmail.com, pw  )

    Then register as a Chrome Web Store Developer
    Various consents:
    (1) Developer Agreement, https://developer.chrome.com/docs/webstore/terms/
    (2) Privacy and Terms, https://policies.google.com/privacy?hl=en
    (3) Developer Program Policies, https://developer.chrome.com/docs/webstore/program_policies/

    "Set up account": https://developer.chrome.com/docs/webstore/publish/#setup-a-developer-account
    - Just added name. Also needed to re-add and verify email address for some reason

    Tried to follow the instructions here to "upload a new item" (a new extension)
    https://developer.chrome.com/docs/webstore/publish/#upload-your-item

    But was first told I needed to add two-step authentication, here:
    https://myaccount.google.com/signinoptions/two-step-verification/enroll-welcome

    Did that, then went back to upload a new item
    Added description, Category, Language, Store icon (used same icon as in my extension folder)

    Need to complete many fields in addition to the 4 above to allow
    me to submit for review:
    - Had to click Privacy Practices" and provide several
    justifications for different persmissions that my app requires
    - Had to update a precisely-sized screenshot of the extension in use

Questions