Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Smotret-anime addblocker
- // @namespace http://tampermonkey.net/
- // @version 0.4
- // @description Turns off smotret-anime adds
- // @author Gjmrd
- // @run-at document-end
- // @match https://smotret-anime.ru/*
- // @include https://smotret-anime.ru/*
- // @include https://play.shikimori.org/*
- // @grant none
- // ==/UserScript==
- (function() {
- if(typeof(window.getCookieItem) == "function"){
- var watchedVideoToday = window.getCookieItem("watchedVideoToday");
- var lastDate = window.getCookieItem("lastDate");
- var dateTime = new Date();
- var today = dateTime.getDate(), now = dateTime.getTime();
- if ((isNaN(watchedVideoToday)) || (today != lastDate)){
- watchedVideoToday = 1;
- lastDate = today;
- }
- var expireTime = (new Date()).setTime(now + (1000 * 60 * 60));
- window.setCookieItem('watchedVideoToday', +watchedVideoToday+1, '/');
- window.setCookieItem('watchedPromoVideo', now, expireTime, '/');
- window.setCookieItem('lastDate', lastDate, '/');
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement