Skip to content

Commit

Permalink
feat:Now Support Zotero7;
Browse files Browse the repository at this point in the history
feat:Adapted to System Dark Mode;
feat:Adapted to Split View Mode;
  • Loading branch information
q77190858 committed Dec 26, 2024
1 parent d697c68 commit 12ca3ff
Show file tree
Hide file tree
Showing 19 changed files with 315 additions and 308 deletions.
27 changes: 13 additions & 14 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Zotero PDF Background Plugin
# Zotero PDF Background Plugin 2.0

![](example1.png)![](example2.png)![](example3.png)
![](example1.jpg)![](example2.jpg)![](example3.jpg)

Install by downloading the [latest version](https://github.com/q77190858/zotero-pdf-background/releases/latest)

## Feature

* **Now Support Zotero7!**
* **Adapted to System Dark Mode!**
* **Adapted to Split View Mode!**
* a multi pdf background to care your eyes
* a button like a eye on the middle toolbar to switch different background mode

Expand All @@ -15,25 +18,21 @@ Install by downloading the [latest version](https://github.com/q77190858/zotero-

## Install

- Download zotero-pdf-backgroundv0.0.2.zip
- Download zotero-pdf-backgroundv2.0.zip
- Open Zotero->tools->plugins->click setting icon on right top->Install Addon from file...
- Select zotero-pdf-backgroundv0.0.2.zip file
- Select zotero-pdf-backgroundv2.0.zip file
- Restart Zotero

## Build Development Environment

follow these steps to build a zotero debug environment

- [ ] Download Firefox 60 (I use a portable edition)
- [ ] Git clone
- [ ] Download and launch [zotero dev edition](https://www.zotero.org/support/dev_builds) with --debugger
- [ ] Launch Firefox 60
- [ ] In Firefox, go to devtools, go to settings, click *'Enable browser chrome and add-on debugging toolboxes'* and *'Enable remote debugging'*.
- [ ] In Zotero, go to setting, advanced, config editor, look up "devtools" and set true on "devtools.debugger.remote-enabled" and set "devtools.debugger.remote-port" 6100
- [ ] In Firefox, click the hamburger menu in the top right -> web developer -> Connect...
- [ ] Enter localhost:6100
- [ ] Connect
- [ ] Click "Inspect Main Process"
- [ ] Download and launch [zotero dev edition](https://www.zotero.org/support/dev_builds) with -ZoteroDebugText -jsdebugger
- [ ] Launch zotero dev edition
- [ ] In zotero dev edition, a independent devtools would be started.
- [ ] A MessageBOX will ask: "An incoming request to permit remote debugging connection was detected. A remote client can take complete control over your browser!" Click "OK" to allow connection.
- [ ] To run plugin from source code, see official [setting_up_a_plugin_development_environment](https://www.zotero.org/support/dev/client_coding/plugin_development#setting_up_a_plugin_development_environment)

## Thanks
This plugin's framework is based on [zotero-night](https://github.com/tefkah/zotero-night)
This plugin's framework is based on [official sample plugin make-it-red](https://github.com/zotero/make-it-red)
42 changes: 42 additions & 0 deletions bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
var PDFBackground;

function log(msg) {
Zotero.debug("zotero-pdf-bakcground: " + msg);
}

function install() {
log("plugin Installed");
}

async function startup({ id, version, rootURI }) {
log("plugin start up");

Zotero.PreferencePanes.register({
pluginID: 'zotero-pdf-bakcground@example.com',
src: rootURI + 'preferences.xhtml',
scripts: [rootURI + 'preferences.js']
});

Services.scriptloader.loadSubScript(rootURI + 'zotero-pdf-bakcground.js');
PDFBackground.init({ id, version, rootURI });
await PDFBackground.main();
}

function onMainWindowLoad({ window }) {
log("Zotero main window load")
}

function onMainWindowUnload({ window }) {
log("Zotero main window unload")
}

function shutdown() {
log("plugin Shutting down");
PDFBackground?.removeAllStyle();
PDFBackground = undefined;
}

function uninstall() {
log("plugin Uninstalled");
PDFBackground?.removeAllStyle();
}
5 changes: 0 additions & 5 deletions chrome.manifest

This file was deleted.

184 changes: 0 additions & 184 deletions content/zotero-pdf-background.js

This file was deleted.

24 changes: 0 additions & 24 deletions content/zotero-pdf-background.xul

This file was deleted.

Binary file added example1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed example1.png
Binary file not shown.
Binary file added example2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed example2.png
Binary file not shown.
Binary file added example3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed example3.png
Binary file not shown.
25 changes: 0 additions & 25 deletions install.rdf

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-US/zotero-pdf-background.dtd

This file was deleted.

2 changes: 2 additions & 0 deletions locale/en-US/zotero-pdf-background.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
zotero-pdf-background =
.label = zotero-pdf-background
15 changes: 15 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"manifest_version": 2,
"name": "Zotero PDF Background",
"version": "2.0",
"description": "Change PDF background color to care for eyes",
"homepage_url": "https://github.com/q77190858/zotero-pdf-background",
"applications": {
"zotero": {
"id": "zotero-pdf-background@example.com",
"update_url": "https://zotero-download.s3.amazonaws.com/tmp/zotero-pdf-background/updates-2.0.json",
"strict_min_version": "6.999",
"strict_max_version": "7.0.*"
}
}
}
1 change: 1 addition & 0 deletions prefs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pref("extensions.zotero-pdf-bakcground.defaultBackground","careeye");
Loading

0 comments on commit 12ca3ff

Please sign in to comment.