-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
27 lines (26 loc) · 1.05 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$(function() {
let src = (new URL("extension.js", document.location)).href;
let bookmarklet = 'javascript:'+encodeURIComponent(JavaScriptObfuscator.obfuscate(`(()=>{
try{
let script = document.createElement("script");
script.src = '${src}';
script.addEventListener('error', (e) => {
alert('Na tej stronie mnie nie uruchomisz 😈');
});
document.head.appendChild(script);
} catch(err){
alert('Na tej stronie mnie nie uruchomisz 😈');
}
})();`).toString());
let btn = $(`<a type="button" class="btn btn-secondary btn-lg bookmarlet d-none" href="${bookmarklet}"><span>🅲🆉🅰🆁🆈 🅼🅰🆁🆈</span></a>`).appendTo('body').on('click',(e)=>{
e.preventDefault();
e.stopPropagation();
alert('Masz przeciągnąć mnie na pasek zakładek, a nie klikać 😈');
});
$('body').one('dblclick',(e)=>{
$('#iframeDiv').hide('slow');
btn.removeClass('d-none').addClass('animate__tada');
e.preventDefault();
e.stopPropagation();
});
});