mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Refactors history and how the database is stored
This commit is contained in:
parent
9c59437ac3
commit
b39f0c311c
7 changed files with 37 additions and 55 deletions
10
extensions/firefox/bootstrap.js
vendored
10
extensions/firefox/bootstrap.js
vendored
|
@ -43,13 +43,6 @@ function getBoolPref(pref, def) {
|
|||
}
|
||||
}
|
||||
|
||||
function setStringPref(pref, value) {
|
||||
var str = Cc['@mozilla.org/supports-string;1']
|
||||
.createInstance(Ci.nsISupportsString);
|
||||
str.data = value;
|
||||
Services.prefs.setComplexValue(pref, Ci.nsISupportsString, str);
|
||||
}
|
||||
|
||||
function log(str) {
|
||||
if (!getBoolPref(EXT_PREFIX + '.pdfBugEnabled', false)) {
|
||||
return;
|
||||
|
@ -176,9 +169,10 @@ function shutdown(aData, aReason) {
|
|||
}
|
||||
|
||||
function install(aData, aReason) {
|
||||
// TODO remove after some time -- cleanup of unused preferences
|
||||
Services.prefs.clearUserPref(EXT_PREFIX + '.database');
|
||||
}
|
||||
|
||||
function uninstall(aData, aReason) {
|
||||
setStringPref(EXT_PREFIX + '.database', '{}');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue