From b87b7351866e52f2b740162e6a3422d32e0dd380 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Jul 2021 18:17:54 +0200 Subject: gather initial fixes --- phttps___www.phoronix.com____.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 phttps___www.phoronix.com____.json (limited to 'phttps___www.phoronix.com____.json') diff --git a/phttps___www.phoronix.com____.json b/phttps___www.phoronix.com____.json new file mode 100644 index 0000000..453b501 --- /dev/null +++ b/phttps___www.phoronix.com____.json @@ -0,0 +1 @@ +[{"sphoronix benchmarks":{"url":"","hash":"","text":"/**\n * Copyright 2021 Wojtek Kosior\n *\n * Available under the terms of Creative Commons Zero.\n */\n\n/* Use with https://www.phoronix.com/*** */\n\n/*\n * Phoronix normally includes scripts that call document.write() to inject\n * tags. The most obvious way o code a fix would then be do download and\n * parse the contents of those scripts. CORS, however, doesn't allow this.\n * Instead, we notice that the openbenchmarking embed script url is related to\n * the actual image url we need, so we can create 's from it straight away.\n */\nfor (const script of document.scripts) {\n const match = /openbenchmarking.org\\/+(embed.php\\?.*)p=0$/.exec(script.src);\n if (!match) continue;\n\n const img = document.createElement(\"img\");\n img.src = `https://openbenchmarking.org/${match[1]}p=2`;\n img.setAttribute(\"type\", \"image/svg+xml\");\n img.setAttribute(\"width\", \"100%\");\n img.setAttribute(\"height\", \"auto\");\n\n script.parentElement.insertBefore(img, script);\n}\n"}},{"phttps://www.phoronix.com/***":{"components":["s","phoronix benchmarks"],"allow":false}}] \ No newline at end of file -- cgit v1.2.3