From e24c60dd6acbb8db5912a7715c302374d7eb18b8 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 18 Feb 2022 18:51:22 +0100 Subject: translate all site fixes to the new Hydrilla format Fixes in new format are yet to be tested. Things may break. Alternative site interfaces were removed. This repository is meant exclusively for holding fixes for js-encumbered websites. Jahoti's SParse code shall be put in a separate repository. --- content/sphoronix_benchmarks/index.json | 6 ----- .../sphoronix_benchmarks/phoronix_benchmarks.js | 27 ---------------------- 2 files changed, 33 deletions(-) delete mode 100644 content/sphoronix_benchmarks/index.json delete mode 100644 content/sphoronix_benchmarks/phoronix_benchmarks.js (limited to 'content/sphoronix_benchmarks') diff --git a/content/sphoronix_benchmarks/index.json b/content/sphoronix_benchmarks/index.json deleted file mode 100644 index 61bb5ce..0000000 --- a/content/sphoronix_benchmarks/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ -"type" : "script", -"name" : "phoronix benchmarks", -"sha256" : "575ec9b3c356337c1f8d1670f3ba459cd9b39b15d51999df1dee35e34da427e1", -"location" : "phoronix_benchmarks.js" -} \ No newline at end of file diff --git a/content/sphoronix_benchmarks/phoronix_benchmarks.js b/content/sphoronix_benchmarks/phoronix_benchmarks.js deleted file mode 100644 index 264545f..0000000 --- a/content/sphoronix_benchmarks/phoronix_benchmarks.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright 2021 Wojtek Kosior - * - * Available under the terms of Creative Commons Zero. - */ - -/* Use with https://www.phoronix.com/*** */ - -/* - * Phoronix normally includes scripts that call document.write() to inject - * tags. The most obvious way o code a fix would then be do download and - * parse the contents of those scripts. CORS, however, doesn't allow this. - * Instead, we notice that the openbenchmarking embed script url is related to - * the actual image url we need, so we can create 's from it straight away. - */ -for (const script of document.scripts) { - const match = /openbenchmarking.org\/+(embed.php\?.*)p=0$/.exec(script.src); - if (!match) continue; - - const img = document.createElement("img"); - img.src = `https://openbenchmarking.org/${match[1]}p=2`; - img.setAttribute("type", "image/svg+xml"); - img.setAttribute("width", "100%"); - img.setAttribute("height", "auto"); - - script.parentElement.insertBefore(img, script); -} -- cgit v1.2.3