diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-02-18 18:51:22 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-02-18 18:51:22 +0100 |
commit | e24c60dd6acbb8db5912a7715c302374d7eb18b8 (patch) | |
tree | 55c6d8818ae734b57b45811391843d69d76f7e2c /content/sphoronix_benchmarks | |
parent | 9ceab6826af54f343a1f09ed0f6b2010552f8a2d (diff) | |
download | hydrilla-fixes-bundle-e24c60dd6acbb8db5912a7715c302374d7eb18b8.tar.gz hydrilla-fixes-bundle-e24c60dd6acbb8db5912a7715c302374d7eb18b8.zip |
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.
Diffstat (limited to 'content/sphoronix_benchmarks')
-rw-r--r-- | content/sphoronix_benchmarks/index.json | 6 | ||||
-rw-r--r-- | content/sphoronix_benchmarks/phoronix_benchmarks.js | 27 |
2 files changed, 0 insertions, 33 deletions
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 - * <img> 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 <img>'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); -} |