Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
agb@immerda.ch
ipick
Commits
3eded414
Commit
3eded414
authored
Mar 29, 2020
by
o@immerda.ch
Browse files
support for adding to onion site
parent
de01beca
Changes
1
Hide whitespace changes
Inline
Side-by-side
ipick.js
View file @
3eded414
var
ipickJsIsIncluded
=
false
;
(
function
(
document
,
logo
)
{
// Prevent ipick being loaded twice
if
(
ipickJsIsIncluded
)
return
;
ipickJsIsIncluded
=
true
;
var
style
=
`
#ipick-button {
position: absolute;
...
...
@@ -116,18 +122,40 @@
// create menu
var
menu
=
document
.
createElement
(
"
div
"
);
menu
.
className
=
"
ipick-menu
"
;
menu
.
innerHTML
=
`
<ul>
<li><a href="https://webmail.immerda.ch">Mail</a></li>
<li><a href="https://wolkig.ch">Cloud</a></li>
<li><a href="https://dl.immerda.ch">Fileshare</a></li>
<li><a href="https://schichtplan.immerda.ch">Schichtplan</a></li>
<li><a href="https://code.immerda.ch">Code</a></li>
<li><a href="https://users.immerda.ch">Einstellungen</a></li>
<li><a href="https://docs.immerda.ch">Hilfe</a></li>
<li><a href="https://www.immerda.ch/contribute/account.html">Spenden</a></li>
</ul>
`
;
var
notOnion
=
location
.
host
.
indexOf
(
'
ysp4gfuhnmj6b4mb.onion
'
)
===
-
1
;
var
idomain
=
notOnion
?
"
immerda.ch
"
:
"
ysp4gfuhnmj6b4mb.onion
"
;
var
menuEntries
=
[
[
"
webmail.
"
+
idomain
,
"
Mail
"
],
[
"
wolkig.ch
"
,
"
Cloud
"
],
[
"
dl.immerda.ch
"
,
"
Fileshare
"
],
[
"
schichtplan.immerda.ch
"
,
"
Schichtplan
"
],
[
"
code.immerda.ch
"
,
"
Code
"
],
[
"
users.
"
+
idomain
,
"
Einstellungen
"
],
[
"
docs.immerda.ch
"
,
"
Hilfe
"
],
[
"
www.
"
+
idomain
+
"
/donate.html
"
,
"
Spenden
"
],
];
var
menuList
=
document
.
createElement
(
"
ul
"
);
menuEntries
.
forEach
(
function
(
e
)
{
var
li
=
document
.
createElement
(
"
li
"
);
var
a
=
document
.
createElement
(
"
a
"
);
a
.
href
=
"
https://
"
+
e
[
0
];
a
.
innerHTML
=
e
[
1
];
li
.
appendChild
(
a
);
menuList
.
appendChild
(
li
);
});
var
nav
=
document
.
createElement
(
"
nav
"
);
nav
.
appendChild
(
menuList
);
menu
.
appendChild
(
nav
);
// create menu toggler
var
image
=
document
.
createElement
(
"
img
"
);
...
...
Write
Preview
Supports
Markdown
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