Commit e0314114 authored by bibliogum's avatar bibliogum
Browse files

event

parent fd9866b1
const DEFAULT_BASE_URL = "http://lama.univ-amu.fr/login?url=$@";
function transformUrl(url) {
var base = localStorage["base_url"];
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
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