From 5ffcc5bd728c790be1aa2fcfae0ae30aaf17c2ba Mon Sep 17 00:00:00 2001 From: smpl Date: Fri, 6 Aug 2021 23:27:11 +0200 Subject: [PATCH] =?UTF-8?q?Tilf=C3=B8jet=20Altinget=20NoJS=20og=20fixet=20?= =?UTF-8?q?copyright=20notice=20i=20Gul=20og=20Gratis=20script.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AltingetNoJS.user.js | 35 +++++++++++++++++++++++++++++++++++ GulogGratisFixListImg.user.js | 3 +++ 2 files changed, 38 insertions(+) create mode 100644 AltingetNoJS.user.js diff --git a/AltingetNoJS.user.js b/AltingetNoJS.user.js new file mode 100644 index 0000000..1807f2e --- /dev/null +++ b/AltingetNoJS.user.js @@ -0,0 +1,35 @@ +// ==UserScript== +// @name Altinget NoJS +// @description Altinget NoJS +// @include https://www.altinget.dk/* +// @version 1 +// @grant none +// ==/UserScript== + +/* SPDX-License-Identifier: Zlib + * Copyright (C) 2021 smpl */ + +var s = document.head.querySelectorAll('script, link, style'); +s.forEach( + function(se) { + se.parentNode.removeChild(se); + } +); + +var st = document.createElement('style'); +st.innerHTML = 'div { max-width: 640px }'; +document.head.appendChild(st); + +s = document.querySelectorAll('script'); + +s.forEach( + function(se) { + + if(/window.__NUXT__/.test(se.innerHTML)) { + var ScriptRaw = se.innerHTML; + var ArticleText = ScriptRaw.match(/\{article:\{[^}]*Text:"(.*?)(?' + JSON.parse('"' + ArticleText[1] + '"') + ''; + } + + } +); diff --git a/GulogGratisFixListImg.user.js b/GulogGratisFixListImg.user.js index 75931d3..fa2c00d 100644 --- a/GulogGratisFixListImg.user.js +++ b/GulogGratisFixListImg.user.js @@ -6,6 +6,9 @@ // @grant none // ==/UserScript== +/* SPDX-License-Identifier: Zlib + * Copyright (C) 2021 smpl */ + /* Hvis man browser guloggratis.dk med nedenstående tilladelser i * uMatrix og alt andet blokeret, så vises der ikke billeder i * annoncelister/søgninger.