diff options
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); -} |