aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/comments/frontend/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/comments/frontend/script.js')
-rw-r--r--bootstrap/comments/frontend/script.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/bootstrap/comments/frontend/script.js b/bootstrap/comments/frontend/script.js
new file mode 100644
index 0000000..8e5c4d5
--- /dev/null
+++ b/bootstrap/comments/frontend/script.js
@@ -0,0 +1,13 @@
+// Get the current HashOver script tag (script.js)
+HashOverConstructor.script = (function ()
+{
+ // Get various scripts
+ var loaderScript = document.getElementById ('hashover-loader');
+ var scripts = document.getElementsByTagName ('script');
+
+ // Use either the current script or an identified loader script
+ var currentScript = document.currentScript || loaderScript;
+
+ // Otherwise, fallback to the last script encountered
+ return currentScript || scripts[scripts.length - 1];
+}) ();