Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
sense3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JosephK
sense3
Commits
af074876
Commit
af074876
authored
Mar 29, 2018
by
JosephK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Random text on the same condition + Better text fallback on img banners + Magritte
parent
e1ad51a7
Pipeline
#44932
passed with stages
in 52 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
136 additions
and
45 deletions
+136
-45
img/sense3-300_350-xx.png
img/sense3-300_350-xx.png
+0
-0
img/sense3-728_90-xx.png
img/sense3-728_90-xx.png
+0
-0
sense3.js
sense3.js
+136
-45
No files found.
img/sense3-300_350-xx.png
0 → 100644
View file @
af074876
6.93 KB
img/sense3-728_90-xx.png
0 → 100644
View file @
af074876
6.02 KB
sense3.js
View file @
af074876
...
...
@@ -111,18 +111,17 @@
text
:
{
en
:
[
'
Microsoft
'
,
'
Do you need a backdoor ?
'
]
},
tags
:
[
'
referrer
'
,
'
microsoft
'
,
'
degooglisons
'
,
'
gafam
'
],
},
diaspora
:
{
condition
:
s
.
is
.
bad
(
'
facebook
'
),
amazon
:
{
condition
:
s
.
is
.
bad
(
'
twitter
'
),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
en
:
'
https://diasporafoundation.org/
'
,
fr
:
'
https://framasphere.org
'
,
},
colors
:
'
#231f20,#ffffff,#ffffff,#f89820,#f89820,#cccccc
'
,
link
:
{
xx
:
'
https://joinmastodon.org
'
},
text
:
{
en
:
[
'
Thank
you for coming from Facebook
'
,
'
Have you thought about trying Diaspora*?
'
],
fr
:
[
'
Merci
d’être venu·e depuis Facebook
'
,
'
Avez-vous pensé à essayer Diaspora* ?
'
],
en
:
[
'
Thank
s for buying from Amazon
'
,
'
And thanks for your personal data!
'
],
fr
:
[
'
Merci
pour vos achats chez Amazon
'
,
'
Et merci pour vous données personnelles !
'
],
},
tags
:
[
'
referrer
'
,
'
facebook
'
,
'
social
'
],
tags
:
[
'
referrer
'
,
'
amazon
'
,
'
gafam
'
],
},
mastodon
:
{
condition
:
s
.
is
.
bad
(
'
twitter
'
),
...
...
@@ -130,29 +129,58 @@
colors
:
'
#282c37,#9baec8,#d9e1e8,#2b90d9,#2b90d9,#9baec8
'
,
link
:
{
xx
:
'
https://joinmastodon.org
'
},
text
:
{
en
:
[
'
Join Mastodon
'
,
'
A free social network in 500 characters
'
],
fr
:
[
'
Rejoignez Mastodon
'
,
'
Le réseau social libre en 500 caractères.
'
],
en
:
[
[
'
Join Mastodon
'
,
'
A free social network in 500 characters
'
],
[
'
Twitter chooses what you see
'
,
'
Choose what you get
'
],
[
'
You came from Twitter
'
,
'
Try an ethic alternative
'
],
[
'
Don’t give your life to Twitter
'
,
'
Give it a Toot!
'
],
],
fr
:
[
[
'
Rejoignez Mastodon
'
,
'
Le réseau social libre en 500 caractères
'
],
[
'
Twitter choisis ce que tu vois
'
,
'
Reprend le pouvoir
'
],
[
'
Vous étiez sur Twitter
'
,
'
Voici une alternative éthique
'
],
[
'
N’offre pas ta vie à Twitter
'
,
'
Offre lui des Pouets !
'
],
],
},
tags
:
[
'
referrer
'
,
'
twitter
'
,
'
social
'
],
},
// Browser
chrome
:
{
condition
:
s
.
is
.
bad
(
'
chrome
'
),
diaspora
:
{
condition
:
s
.
is
.
bad
(
'
facebook
'
),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
xx
:
'
https://www.mozilla.org/firefox/
'
},
link
:
{
en
:
'
https://podupti.me/
'
,
fr
:
'
https://framasphere.org
'
,
},
text
:
{
en
:
[
'
Drop Google Chrome
'
,
'
Surf 2x faster with Firefox Quantum
'
],
fr
:
[
'
Laissez tomber Google Chrome
'
,
'
Surfez 2x plus vite avec Firefox Quantum
'
],
en
:
[
[
'
Want to #DeleteFacebook…?
'
,
'
Here’s an ethic alternative
'
],
[
'
Do you feel clostro-Facebook…?
'
,
'
Breathe with Diaspora*
'
],
[
'
Thank you for coming from Facebook
'
,
'
Have you thought about trying Diaspora*?
'
],
[
'
Facebook saw you came here
'
,
'
Diaspora* would never spy on you
'
],
],
fr
:
[
[
'
Tu veux #DeleteFacebook…?
'
,
'
Voici une alternative éthique
'
],
[
'
Tu te sens esclave de Facebook…?
'
,
'
Diaspora* te libère
'
],
[
'
Merci d’être venu·e depuis Facebook
'
,
'
Avez-vous pensé à essayer Diaspora* ?
'
],
[
'
Facebook t’a vu venir ici
'
,
'
Diaspora* ne t’espionne pas
'
],
],
},
tags
:
[
'
browser
'
,
'
firefox
'
,
'
mozilla
'
,
'
google
'
,
'
chrome
'
],
tags
:
[
'
referrer
'
,
'
facebook
'
,
'
social
'
,
'
gafam
'
],
},
chrome2
:
{
// Browser
chrome
:
{
condition
:
s
.
is
.
bad
(
'
chrome
'
),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
xx
:
'
https://www.mozilla.org/firefox/
'
},
text
:
{
en
:
[
'
Chrome is unsecure
'
,
'
Firefox protects your data
'
],
fr
:
[
'
Chrome n’est pas sûr
'
,
'
Firefox protège vos données
'
],
en
:
[
[
'
Drop Google Chrome
'
,
'
Surf 2x faster with Firefox Quantum
'
],
[
'
Chrome is unsecure
'
,
'
Firefox protects your data
'
],
],
fr
:
[
[
'
Laissez tomber Google Chrome
'
,
'
Surfez 2x plus vite avec Firefox Quantum
'
],
[
'
Chrome n’est pas sûr
'
,
'
Firefox protège vos données
'
],
],
},
tags
:
[
'
browser
'
,
'
firefox
'
,
'
mozilla
'
,
'
google
'
,
'
chrome
'
],
},
...
...
@@ -166,9 +194,10 @@
},
tags
:
[
'
browser
'
,
'
firefox
'
,
'
mozilla
'
,
'
microsoft
'
,
'
gafam
'
],
},
firefox
:
{
firefox
Update
:
{
condition
:
(
bowser
.
firefox
&&
bowser
.
version
<=
56
),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
colors
:
'
#0a84ff,#363959,#363959,#00feff,#ff9400,#cccccc
'
,
link
:
{
xx
:
'
https://www.mozilla.org/firefox/
'
},
text
:
{
en
:
[
'
Firefox Quantum
'
,
'
Internet for people, not profit.
'
],
...
...
@@ -176,25 +205,22 @@
},
tags
:
[
'
browser
'
,
'
firefox
'
,
'
mozilla
'
,
'
chrome
'
,
'
google
'
],
},
firefox2
:
{
condition
:
s
.
is
.
bad
(
'
browser
'
),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
xx
:
'
https://www.mozilla.org/firefox/
'
},
text
:
{
en
:
[
'
Firefox Quantum
'
,
'
Internet for people, not profit.
'
],
fr
:
[
'
Passez à Firefox Quantum
'
,
'
La dernière version ultra-rapide de Mozilla
'
],
},
tags
:
[
'
browser
'
,
'
firefox
'
,
'
mozilla
'
,
'
chrome
'
,
'
google
'
],
},
firefox3
:
{
firefox
:
{
condition
:
s
.
is
.
bad
(
'
browser
'
),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
colors
:
'
#0a84ff,#363959,#363959,#00feff,#ff9400,#cccccc
'
,
link
:
{
xx
:
'
https://www.mozilla.org/firefox/
'
},
text
:
{
en
:
[
'
Firefox Quantum
'
,
'
Internet for people, not profit.
'
],
fr
:
[
'
Passez à Firefox Quantum
'
,
'
La dernière version ultra-rapide de Mozilla
'
],
en
:
[
[
'
Have you ever tried Firefox?
'
,
'
Firefox is fast and respects your privacy.
'
],
[
'
Your privacy matters!
'
,
'
Firefox is fast and respects your privacy
'
],
],
fr
:
[
[
'
Avez-vous déjà essayé Firefox ?
'
,
'
Le navigateur rapide et respectueux de votre vie privée
'
],
[
'
Votre vie privée est importante !
'
,
'
Firefox est rapide et respecte votre vie privée
'
],
],
},
tags
:
[
'
browser
'
,
'
firefox
'
,
'
mozilla
'
,
'
chrome
'
,
'
google
'
],
tags
:
[
'
browser
'
,
'
firefox
'
,
'
mozilla
'
,
'
chrome
'
,
'
google
'
,
'
safari
'
,
'
opera
'
,
'
microsoft
'
],
},
// Adblock
ublock
:
{
...
...
@@ -202,11 +228,36 @@
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
xx
:
'
https://github.com/gorhill/uBlock
'
},
text
:
{
en
:
[
'
Relieve the Internet (and your eyes)
'
,
'
Use an ad blocker
'
],
en
:
[
'
Relieve the Internet (and your eyes)
'
,
'
Use an ad blocker
'
],
fr
:
[
'
Soulagez Internet (et vos yeux)
'
,
'
Utilisez un bloqueur de pub
'
],
},
tags
:
[
'
browser
'
,
'
adblock
'
,
'
advertising
'
],
},
ublockFirefox
:
{
condition
:
(
!
s
.
is
.
adblock
()
&&
bowser
.
firefox
),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
en
:
'
https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
'
,
fr
:
'
https://addons.mozilla.org/fr/firefox/addon/ublock-origin/
'
,
},
text
:
{
en
:
[
'
Please, block this ad
'
,
'
Install Ublock Origins
'
],
fr
:
[
'
S’il te plaît, bloque cette pub…
'
,
'
Installe Ublock Origins
'
],
},
tags
:
[
'
browser
'
,
'
adblock
'
,
'
advertising
'
,
'
mozilla
'
,
'
firefox
'
],
},
ublockChrome
:
{
condition
:
(
!
s
.
is
.
adblock
()
&&
s
.
is
.
bad
(
'
chrome
'
)),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
xx
:
'
https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm
'
,
},
text
:
{
en
:
[
'
Relieve the Internet (and your eyes)
'
,
'
Use an ad blocker
'
],
fr
:
[
'
Soulagez Internet (et vos yeux)
'
,
'
Utilisez un bloqueur de pub
'
],
},
tags
:
[
'
browser
'
,
'
adblock
'
,
'
advertising
'
,
'
google
'
,
'
chrome
'
],
},
green
:
{
condition
:
(
!
s
.
is
.
adblock
()
&&
(
s
.
is
.
ref
(
'
lilo.org
'
)
||
s
.
is
.
ref
(
'
ecosia.org
'
))),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
...
...
@@ -238,19 +289,42 @@
},
tags
:
[
'
system
'
,
'
mageia
'
,
'
windows
'
,
'
linux
'
,
'
mac
'
],
},
windows10
:
{
ubuntu
:
{
condition
:
s
.
is
.
bad
(
'
win10
'
),
colors
:
'
#e95420,#ffffff,#ffffff,#000000,#77216f,#cccccc
'
,
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
en
:
'
https://www.ubuntu.com/desktop
'
,
fr
:
'
http://ubuntu-fr.org
'
,
},
text
:
{
en
:
[
'
Ubuntu
'
,
'
Replace your Windows 10 with the most popular linux distribution
'
],
fr
:
[
'
Ubuntu
'
,
'
Remplacez votre Windows 10 par la distribution linux la plus populair
e
'
],
en
:
[
'
Your Windows feeds on your data
'
,
'
Here’s an alternative
'
],
fr
:
[
'
Ce Windows pompe tes données
'
,
'
Voici une alternativ
e
'
],
},
tags
:
[
'
system
'
,
'
ubuntu
'
,
'
windows
'
,
'
linux
'
,
'
mac
'
],
},
win10
:
{
condition
:
s
.
is
.
bad
(
'
win10
'
),
format
:
[
'
txt
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
en
:
'
https://fix10.isleaked.com
'
,
fr
:
'
https://www.cnil.fr/fr/reglez-les-parametres-vie-privee-de-windows-10
'
,
},
text
:
{
en
:
[
'
Your Windows is watching you
'
,
'
Here is how to blind it
'
],
fr
:
[
'
Ton Windows te regarde
'
,
'
Voici comment l’aveugler
'
],
},
tags
:
[
'
system
'
,
'
microsoft
'
,
'
windows
'
],
},
sense3
:
{
condition
:
false
,
format
:
[
'
jpg
'
,
'
300x250
'
,
'
728x90
'
],
link
:
{
xx
:
'
https://sense3.org
'
},
text
:
{
en
:
[
'
This is not an ad
'
,
'
(nor a pipe)
'
],
fr
:
[
'
Ceci n’est pas une pub
'
,
'
(ni une pipe)
'
],
},
},
// Art
vangogh
:
{
condition
:
true
,
...
...
@@ -393,12 +467,29 @@
const
llg
=
(
d
[
id
].
link
.
xx
!==
undefined
)
?
'
xx
'
:
lg
;
const
tlg
=
(
d
[
id
].
text
[
lg
]
===
undefined
)
?
'
en
'
:
lg
;
// replace 'en' by browser default lang (if text is avalaible)
// Is a random sentense ?
let
t1
=
''
;
let
t2
=
''
;
if
(
typeof
d
[
id
].
text
[
tlg
][
0
]
===
'
string
'
)
{
[
t1
,
t2
]
=
d
[
id
].
text
[
tlg
];
}
else
if
(
d
[
id
].
text
[
tlg
][
0
].
constructor
.
name
===
'
Array
'
)
{
const
random
=
Math
.
floor
(
Math
.
random
()
*
d
[
id
].
text
[
tlg
].
length
);
[
t1
,
t2
]
=
d
[
id
].
text
[
tlg
][
random
];
}
let
html
=
''
;
// Image
if
(
/
(
png|jpg|gif
)
/
.
test
(
type
))
{
html
=
`
<a id="img" href="
${
d
[
id
].
link
[
llg
]}
" target="_blank" title="
${
d
[
id
].
text
[
tlg
].
join
(
'
-
'
)}
">
<img alt="
${
d
[
id
].
text
[
tlg
].
join
(
'
-
'
)}
" src="img/
${
id
}
-
${
w
}
_
${
h
}
-
${
llg
}
.
${
type
}
" />
<img alt="" src="img/
${
id
}
-
${
w
}
_
${
h
}
-
${
llg
}
.
${
type
}
"
onload="document.getElementById('text').style='display:none;';"
onerror="this.style='display:none;';" />
</a>
<a id="text" href="
${
d
[
id
].
link
[
llg
]}
" target="_blank">
<h1>
${
t1
}
</h1>
<p>
${
d
[
id
].
link
[
llg
].
split
(
'
/
'
)[
2
]}
</p>
<h2>
${
t2
}
</h2>
<button aria-hidden="true">➤</button>
</a>`
;
// Video
...
...
@@ -407,9 +498,9 @@
<a id="video" href="
${
d
[
id
].
link
[
llg
]}
" target="_blank">
<video autoplay="" muted loop="loop" preload="none">
<source src="img/
${
id
}
-
${
w
}
_
${
h
}
-
${
llg
}
.
${
type
}
" type="video/
${
type
}
"/>
<h1>
${
d
[
id
].
text
[
tlg
][
0
]
}
</h1>
<h1>
${
t1
}
</h1>
<p>
${
d
[
id
].
link
[
llg
].
split
(
'
/
'
)[
2
]}
</p>
<h2>
${
d
[
id
].
text
[
tlg
][
1
]
}
</h2>
<h2>
${
t2
}
</h2>
<button aria-hidden="true">➤</button>
</video>
</a>`
;
...
...
@@ -417,9 +508,9 @@
}
else
{
html
=
`
<a id="text" href="
${
d
[
id
].
link
[
llg
]}
" target="_blank">
<h1>
${
d
[
id
].
text
[
tlg
][
0
]
}
</h1>
<h1>
${
t1
}
</h1>
<p>
${
d
[
id
].
link
[
llg
].
split
(
'
/
'
)[
2
]}
</p>
<h2>
${
d
[
id
].
text
[
tlg
][
1
]
}
</h2>
<h2>
${
t2
}
</h2>
<button aria-hidden="true">➤</button>
</a>`
;
}
...
...
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