Skip to content

Commit

Permalink
A Chrome extension is available to directly add the current URL to yo…
Browse files Browse the repository at this point in the history
…ur Skytoop desktop ! - sources on chrome_extension/ folder
  • Loading branch information
Unitech committed Jun 15, 2011
1 parent 7641135 commit 53700b8
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
Binary file added chrome_extension/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added chrome_extension/64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions chrome_extension/background.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<html>
<script type="text/javascript" charset="utf-8">

var url_dest = 'http://www.skytoop.com/';


chrome.browserAction.onClicked.addListener (function (tab) {
var urol = tab.url;
function isSkytoopUrl(url){
if (url.indexOf(url_dest) >= 0)
return true;
else
return false;
}
function getNewUrl(url){
return url_dest + "?url=" + url;
}
chrome.tabs.getAllInWindow(undefined, function(tabs) {
for (var i = 0, tab; tab = tabs[i]; i++) {
if (tab.url && isSkytoopUrl(tab.url)) {
chrome.tabs.update(tab.id, {url : getNewUrl(urol), selected: true});
return;
}
}
chrome.tabs.create({url: getNewUrl(urol), selected : true});
});
});
</script>
</html>
18 changes: 18 additions & 0 deletions chrome_extension/jquery.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions chrome_extension/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Skytoop marker",
"version": "1.0",
"homepage_url" : "http://www.skytoop.com/",
"description": "Add directly a link on your Skytoop !",
"icons": {
"128": "128.png",
"64": "64.png"
},
"browser_action": {
"default_icon": "64.png"
},
"background_page": "background.html",
"permissions": [
"tabs"
]
}

0 comments on commit 53700b8

Please sign in to comment.