summaryrefslogtreecommitdiff
path: root/data/extensions/tortm-browser-button@jeremybenthum/lib/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'data/extensions/tortm-browser-button@jeremybenthum/lib/chrome')
-rw-r--r--data/extensions/tortm-browser-button@jeremybenthum/lib/chrome/chrome.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/data/extensions/tortm-browser-button@jeremybenthum/lib/chrome/chrome.js b/data/extensions/tortm-browser-button@jeremybenthum/lib/chrome/chrome.js
index 14491f7..ebb58e9 100644
--- a/data/extensions/tortm-browser-button@jeremybenthum/lib/chrome/chrome.js
+++ b/data/extensions/tortm-browser-button@jeremybenthum/lib/chrome/chrome.js
@@ -3,9 +3,13 @@ var app = {};
app.button = {set icon (o) {chrome.browserAction.setIcon(o)}};
app.version = function () {return chrome.runtime.getManifest().version};
app.homepage = function () {return chrome.runtime.getManifest().homepage_url};
-app.tab = {"open": function (url) {chrome.tabs.create({"url": url, "active": true})}};
if (chrome.runtime.setUninstallURL) chrome.runtime.setUninstallURL(app.homepage() + "?v=" + app.version() + "&type=uninstall", function () {});
+app.tab = {
+ "reload": function (url) {chrome.tabs.reload(function () {})},
+ "open": function (url) {chrome.tabs.create({"url": url, "active": true})}
+};
+
app.storage = (function () {
var objs = {};
window.setTimeout(function () {
@@ -21,8 +25,8 @@ app.storage = (function () {
"read": function (id) {return objs[id]},
"write": function (id, data) {
var tmp = {};
- objs[id] = data;
tmp[id] = data;
+ objs[id] = data;
chrome.storage.local.set(tmp, function () {});
}
}