Permalink
Browse files

v5.0 Context Menu

  • Loading branch information...
1 parent 43bb4c8 commit 04b0e0ab5d99aa50c9fdf99e4010e9eaca7c0704 @codysherman committed Feb 16, 2011
Showing with 498 additions and 434 deletions.
  1. +15 −6 background.html
  2. +277 −303 content_script.js
  3. +13 −0 context_menu.js
  4. +124 −104 jquery.scroll.pack.js
  5. +4 −4 manifest.json
  6. +63 −16 options.html
  7. +2 −1 style.css
View
@@ -1,6 +1,6 @@
<script>
-// Creates options defaults in case user hasn't set them yet.
+// Creates options defaults in case user hasn't set them yet
if (!localStorage["scroll_speed"]) {
localStorage["scroll_speed"] = 1000;
}
@@ -16,9 +16,6 @@
if (!localStorage["arrow"]) {
localStorage["arrow"] = "arrow_blue";
}
- /*if (!localStorage["scroll"]) {
- localStorage["scroll"] = "jswing";
- }*/
if (!localStorage["location"]) {
localStorage["location"] = "TR";
}
@@ -28,6 +25,9 @@
if (!localStorage["transparency"]) {
localStorage["transparency"] = "0.5";
}
+ if (!localStorage["contextmenu"]) {
+ localStorage["contextmenu"] = "on";
+ }
if (!localStorage["loadcount"]) {
localStorage["loadcount"] = "0";
}
@@ -37,18 +37,26 @@
localStorage["bothered"]="1";
}
}
+ if ((localStorage["loadcount"]>=3) && (localStorage["bothered2"]!="1")) {
+ chrome.tabs.create({url:'http://scrolltotopbutton.tumblr.com/STTBdonate',selected:false});
+ localStorage["bothered2"]="1";
+ }
+ if ((localStorage["loadcount"]<=2) && (localStorage["bothered2"]!="1")) {
+ localStorage["bothered2"]="1";
+ }
if (localStorage["stbb"]=="on") {
localStorage["stbb"] = "flip";
}
if (localStorage["latest"]!="2"){
chrome.tabs.create({url:'/options.html',selected:false});
}
+// Counts number of times Chrome has been opened to load donation message after certain amount
loadcount=localStorage["loadcount"];
loadcount++;
localStorage["loadcount"]=loadcount;
-// Message passer to give [LocalStorage] settings to content_script.js which is not allowed access to [LocalStorage].
+// Message passer to give [LocalStorage] settings to content_script.js because it is not allowed access to [LocalStorage]
chrome.extension.onRequest.addListener(
function(request, sender, sendResponse) {
if (request.greeting == "settings")
@@ -61,4 +69,5 @@
-</script>
+</script>
+<script src="context_menu.js"></script>
Oops, something went wrong.

0 comments on commit 04b0e0a

Please sign in to comment.