Skip to content

Commit

Permalink
fixed tmpl/js/loading.js by utilizing document.currentScript instead …
Browse files Browse the repository at this point in the history
…of the former hack.
  • Loading branch information
KojiNakamaru committed Sep 25, 2023
1 parent f184079 commit c5d4189
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tmpl/js/loading.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
(function() {
var INTERVAL = 500;
var UPDATE_TIME = '0';
// cf. http://d.hatena.ne.jp/amachang/20061201/1164986067
var currentScript
= (function (e) {
if (e.nodeName.toLowerCase() == 'script') {
return e;
}
return arguments.callee(e.lastChild);
})(document);
// cf. https://stackoverflow.com/questions/403967/how-may-i-reference-the-script-tag-that-loaded-the-currently-executing-script
var currentScript = document.currentScript;
if (currentScript.hasAttributes()) {
for (var i in currentScript.attributes) {
var attr = currentScript.attributes[i];
Expand Down

0 comments on commit c5d4189

Please sign in to comment.