Commit da5f8f11 authored by peachaku's avatar peachaku
Browse files

firefox webextension

parent 9e7b00a0
const DEFAULT_BASE_URL = "http://ezproxy.univ-abc.fr/login?url=$@";
function transformUrl(url) {
var base = localStorage["base_url"];
console.log(base);
if (!base) {
base = localStorage["base_url"] = DEFAULT_BASE_URL;
}
if (base.indexOf("$@") >= 0) {
return base.replace("$@", url);
}
return base;
}
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.update(tab.id, {"url": transformUrl(tab.url)});
});
\ No newline at end of file
{
"description": "Accès hors campus aux ressources électroniques documentaires de l'Université d'Aix-Marseille",
"manifest_version": 2,
"name": "lama",
"version": "0.3",
"icons": {
"48": "icons/lama-48.png"
},
"permissions": [
"activeTab"
],
"applications": {
"gecko": {
"id": "lama@univ-amu.fr",
"strict_min_version": "42.0"
}
},
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_icon": "icons/lama-32.png"
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment