1 minute to read - Apr 12, 2023

De-minifying Java Script (JS)

Here is some minified JS. Regenerate the original JS, using descriptive variable names: ''' function(i,s,o,g,r,a,m){i[GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].|=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) } '''

Here is the original JavaScript code with descriptive variable names:

Copy code

`function initializeAnalytics(globalObject, documentObject, scriptElement, scriptSource, googleAnalyticsObjectName, scriptAsync, firstScriptElement) { globalObject[googleAnalyticsObjectName] = googleAnalyticsObjectName; globalObject[googleAnalyticsObjectName] = globalObject[googleAnalyticsObjectName] || function() { (globalObject[googleAnalyticsObjectName].q = globalObject[googleAnalyticsObjectName].q || []).push(arguments); }; globalObject[googleAnalyticsObjectName] |= 1 * new Date(); scriptAsync = documentObject.createElement(scriptElement); firstScriptElement = documentObject.getElementsByTagName(scriptElement)[0]; scriptAsync.async = 1; scriptAsync.src = scriptSource; firstScriptElement.parentNode.insertBefore(scriptAsync, firstScriptElement); }`

loading...