Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
emilie.lecorre
lama-addons
Commits
da5f8f11
Commit
da5f8f11
authored
Nov 22, 2016
by
peachaku
Browse files
firefox webextension
parent
9e7b00a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
firefox/lama@univ-amu.fr/background.js
0 → 100644
View file @
da5f8f11
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
firefox/lama@univ-amu.fr/icons/lama-32.png
0 → 100644
View file @
da5f8f11
628 Bytes
firefox/lama@univ-amu.fr/icons/lama-48.png
0 → 100644
View file @
da5f8f11
819 Bytes
firefox/lama@univ-amu.fr/manifest.json
0 → 100644
View file @
da5f8f11
{
"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"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment