You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
817 B

// @name FreeDelfi
// @namespace http://tampermonkey.net/
// @version 0.1
// @description asdasd
// @author asdasd
// @match https://*.delfi.ee/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function () {
'use strict';
const secretCode = () => {
const now = new Date()
const yyyymmdd = +now.toISOString().slice(0, 10).replace(/-/g, '')
const yyyy = now.getFullYear()
return yyyymmdd * yyyy
}
const modify = () => {
console.log("freedelfi");
history.replaceState(null, null, "?preview=" + secretCode());
window.location.reload();
}
return window.location.href.split('?')[1] && window.location.href.split('?')[1].includes('preview') ? undefined : modify();
})();