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
3911b490
Commit
3911b490
authored
Jun 08, 2012
by
llhuillier
Browse files
stuff2
parent
54fba78e
Changes
4
Hide whitespace changes
Inline
Side-by-side
chrome/lama@univ-amu.fr/manifest.json
View file @
3911b490
...
...
@@ -12,6 +12,6 @@
},
"browser_action"
:
{
"default_icon"
:
"button.png"
,
"default_title"
:
"
Recharger la page
"
"default_title"
:
"
Accès hors campus
"
}
}
\ No newline at end of file
firefox/lama@univ-amu.fr/chrome/button.css
View file @
3911b490
#
c
button
#
my
button
{
list-style-image
:
url("chrome://custombutton/content/button.png")
;}
\ No newline at end of file
firefox/lama@univ-amu.fr/chrome/button.xul
View file @
3911b490
...
...
@@ -13,13 +13,13 @@
<!-- Firefox -->
<toolbarpalette
id=
"BrowserToolbarPalette"
>
<toolbarbutton
id=
"
c
button"
/>
<toolbarbutton
id=
"
my
button"
/>
</toolbarpalette>
<!-- button details -->
<toolbarbutton
id=
"
c
button"
<toolbarbutton
id=
"
my
button"
label=
"Accès distant"
tooltiptext=
"
Recharger la page
"
tooltiptext=
"
Accès hors campus
"
oncommand=
"transformUrl()"
class=
"toolbarbutton-1 chromeclass-toolbar-additional custombutton"
/>
...
...
firefox/lama@univ-amu.fr/chrome/init.js
View file @
3911b490
...
...
@@ -2,18 +2,18 @@ window.addEventListener("load", em_myextensionLoad, true);
function
em_myextensionLoad
()
{
if
(
document
.
getElementById
(
"
c
button
"
))
return
;
if
(
document
.
getElementById
(
"
my
button
"
))
return
;
try
{
var
firefoxnav
=
document
.
getElementById
(
"
nav-bar
"
);
var
curSet
=
firefoxnav
.
currentSet
;
if
(
curSet
.
indexOf
(
"
c
button
"
)
==
-
1
)
if
(
curSet
.
indexOf
(
"
my
button
"
)
==
-
1
)
{
var
set
;
if
(
curSet
.
indexOf
(
"
urlbar-container
"
)
!=
-
1
)
set
=
firefoxnav
.
currentSet
+
"
,
c
button
"
;
set
=
firefoxnav
.
currentSet
+
"
,
my
button
"
;
else
set
=
curSet
.
replace
(
/urlbar-container/
,
"
c
button,urlbar-container
"
);
set
=
curSet
.
replace
(
/urlbar-container/
,
"
my
button,urlbar-container
"
);
firefoxnav
.
setAttribute
(
"
currentset
"
,
set
);
firefoxnav
.
currentSet
=
set
;
document
.
persist
(
"
nav-bar
"
,
"
currentset
"
);
...
...
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