aboutsummaryrefslogtreecommitdiff
path: root/phttps___www.phoronix.com____.json
diff options
context:
space:
mode:
Diffstat (limited to 'phttps___www.phoronix.com____.json')
-rw-r--r--phttps___www.phoronix.com____.json1
1 files changed, 1 insertions, 0 deletions
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 * <img> 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 <img>'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