Skip to content

Commit

Permalink
Make browser button clickable
Browse files Browse the repository at this point in the history
Just another optional way to do topscrolling.
  • Loading branch information
sv3k committed Dec 7, 2016
1 parent 8a2980a commit c3561b0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"appDesc": {
"message": "Click on the left border of any page for scroll to the top."
},
"browserAction": {
"message": "Scroll to the top or return"
}
}
3 changes: 3 additions & 0 deletions _locales/ru/messages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"appDesc": {
"message": "Кликните на левой границе экрана для прокрутки любой страницы в начало."
},
"browserAction": {
"message": "Прокрутить вверх или вернуться"
}
}
5 changes: 5 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript({
code: 'document.getElementById("topscroll-chrome-extension-bar").click()'
});
});
9 changes: 8 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,12 @@
"css": ["basic.css"],
"js": ["contentscript.js"]
}
]
],
"background": {
"scripts": ["background.js"],
"persistent": false
},
"browser_action": {
"default_title": "__MSG_browserAction__"
}
}

0 comments on commit c3561b0

Please sign in to comment.