Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Smotert-anime add blocker
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Turns off smotret-anime adds
- // @author Gjmrd
- // @match https://smotret-anime.ru/*
- // @include https://smotret-anime.ru/*
- // @include https://shikimori.org/*
- // @grant none
- // ==/UserScript==
- (function() {
- console.log(213);
- if ( (/https:\/\/play.shikimori.org/.test(location.href)) ) {
- var script = document.createElement('script');
- script.innerHTML = `
- var watchedVideoToday = getCookieItem("watchedVideoToday");
- var expireTime = (new Date()).setTime((new Date()).getTime() + (1000 * 60 * 60));
- setCookieItem('watchedVideoToday', +watchedVideoToday+1, '/');
- setCookieItem('watchedPromoVideo', (new Date()).getTime(), expireTime, '/', '');
- `;
- script.setAttribute('id', 'super_id_name');
- document.body.appendChild(script);
- }
- console.log(21453433);
- console.log(document.cookie);
- var watchedVideoToday = getCookieItem("watchedVideoToday");
- var expireTime = (new Date()).setTime((new Date()).getTime() + (10)); /* time in ms */
- // setCookieItem('watchedVideoToday', +watchedVideoToday+1, '/');
- // setCookieItem('watchedPromoVideo', (new Date()).getTime(), expireTime, '/');
- setCookieItem('watchedVideoToday', +watchedVideoToday+1, '/');
- setCookieItem('watchedPromoVideo', (new Date()).getTime(), expireTime, '/');
- console.log(21453)
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement