-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
/* Load extension scripts and add-on into the viewer page */ | ||
if (window.location.protocol === "moz-extension:") { | ||
import("./mv2/page-script.js"); | ||
} else { | ||
import("./mv3/page-script.js"); | ||
} | ||
import "./mv3/page-script.js"; | ||
import "./doqment.js"; | ||
import "/doq/addon/doq.js"; | ||
import "../doq/addon/doq.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import { getPdfUrl } from "../utils.js"; | ||
import { execOnEvent } from "../utils.js"; | ||
|
||
/* Copy PDF URL to clipboard */ | ||
chrome.runtime.onMessage.addListener(respond); | ||
|
||
function respond(request) { | ||
if (request.action === "copyPdfURL") { | ||
const pdfUrl = getPdfUrl(); | ||
if (pdfUrl.startsWith("http")) | ||
navigator.clipboard.writeText(pdfUrl); | ||
} | ||
} | ||
/* Make Solarized the pre-selected color scheme */ | ||
execOnEvent("init", [() => { | ||
let pref = JSON.stringify({ scheme: 3, tone: "1" }); | ||
localStorage.setItem("doq.preferences.light", pref); | ||
pref = JSON.stringify({ scheme: 3, tone: "2" }); | ||
localStorage.setItem("doq.preferences.dark", pref); | ||
}]); |