cleanup code for document.currentScript workaround
Merge pull request #700 from kossebau/cleanCodeForDocumentCurrentScriptWorkaround

cleanup code for document.currentScript workaround