Skip to content

Commit

Permalink
Add 0.2 version with update stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-healey committed Jan 9, 2024
1 parent b8bcf54 commit 3c3b127
Show file tree
Hide file tree
Showing 18 changed files with 161 additions and 198 deletions.
Binary file modified build/open-inline-citation.xpi
Binary file not shown.
5 changes: 4 additions & 1 deletion make-zips
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -euo pipefail
rm -rf build
mkdir build

cd src-1.2
cd src
zip -r ../build/open-inline-citation.xpi *
cd ../build

echo "Hash of current version:"
shasum -a 256 open-inline-citation.xpi | cut -d' ' -f1
18 changes: 18 additions & 0 deletions open-inline-citations-update.json.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"addons": {
"open-inline-citation@example.com": {
"updates": [
{
"version": "0.2",
"update_link": "TODO point to release",
"update_hash": "c568d6d2aeec7fda1dea473b3370a8b85b30d745d505bb38d5fcbf868580fc8a",
"applications": {
"gecko": {
"strict_min_version": "60.0"
}
}
}
]
}
}
}

This file was deleted.

2 changes: 0 additions & 2 deletions src-1.2/locale/en-US/open-inline-citation.ftl

This file was deleted.

128 changes: 0 additions & 128 deletions src-1.2/make-it-red.js

This file was deleted.

3 changes: 0 additions & 3 deletions src-1.2/prefs.js

This file was deleted.

46 changes: 0 additions & 46 deletions src-inline/bootstrap.js

This file was deleted.

19 changes: 6 additions & 13 deletions src-1.2/bootstrap.js → src/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const version = "0.2";

if (typeof Zotero == "undefined") {
var Zotero;
}
Expand Down Expand Up @@ -127,7 +129,7 @@ function setDefaultPrefs(rootURI) {
async function install() {
await waitForZotero();

log("Installed 1.2");
log(`Installed ${version}`);
}

async function startup({
Expand All @@ -138,7 +140,7 @@ async function startup({
}) {
await waitForZotero();

log("Starting 1.2");
log(`Starting ${version}`);

// 'Services' may not be available in Zotero 6
if (typeof Services == "undefined") {
Expand All @@ -155,7 +157,6 @@ async function startup({
setDefaultPrefs(rootURI);
}

Services.scriptloader.loadSubScript(rootURI + "make-it-red.js");
Services.scriptloader.loadSubScript(rootURI + "inline-citations.js");

Zotero.setTimeout(() => addListeners(), 2000);
Expand All @@ -170,27 +171,19 @@ async function startup({
},
["tab"]
);

MakeItRed.init({ id, version, rootURI });
MakeItRed.addToAllWindows();
await MakeItRed.main();
}

function onMainWindowLoad({ window }) {}

function onMainWindowUnload({ window }) {
MakeItRed.removeFromWindow(window);
}

function shutdown() {
log("Shutting down 1.2");
log(`Shutting down ${version}`);

if (Zotero.platformMajorVersion < 102) {
removeMainWindowListener();
}

MakeItRed.removeFromAllWindows();
MakeItRed = undefined;
}

function uninstall() {
Expand All @@ -200,5 +193,5 @@ function uninstall() {
return;
}

log("Uninstalled 1.2");
log(`Uninstalled ${version}`);
}
File renamed without changes.
Empty file.
File renamed without changes.
6 changes: 3 additions & 3 deletions src-1.2/install.rdf → src/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<Description about="urn:mozilla:install-manifest">
<em:id>open-inline-citation@example.com</em:id>
<em:name>Open Inline Citation</em:name>
<em:version>0.1</em:version>
<em:version>0.2</em:version>
<em:multiprocessCompatible>true</em:multiprocessCompatible>
<em:updateURL>https://zotero-download.s3.amazonaws.com/tmp/open-inline-citation/updates-0.1.json</em:updateURL>
<em:homepageURL>https://github.com/zotero/open-inline-citation</em:homepageURL>
<em:updateURL>https://raw.githubusercontent.com/andrew-healey/open-inline-citation/main/updates.json</em:updateURL>
<em:homepageURL>https://github.com/andrew-healey/open-inline-citation</em:homepageURL>
<em:localized>
<Description>
<em:locale>en-US</em:locale>
Expand Down
Empty file.
Loading

0 comments on commit 3c3b127

Please sign in to comment.