Last active
August 9, 2017 02:04
-
-
Save anilmeena/3678b97ca1a3036a25b3ee02d8e9df54 to your computer and use it in GitHub Desktop.
Security Badges 2 on shopify checkout page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1: Open Shopify store Admin. | |
Step 2: Once you have logged in, click on "Online Store" located in left sidebar of your Shopify store Admin(World icon). | |
Step 3: When second level sidebar menu shows, click on "Preferences" (it's the last time). | |
Step 4. Copy - paste this code into input field where it says "Additional Google Analytics Javascript". | |
}; | |
if(typeof Checkout === 'object'){if(typeof Checkout.$ === 'function'){(function (src) {var tagName = 'script',script = document.createElement(tagName);script.src = src;var head = document.getElementsByTagName('head')[0];head.insertBefore(script, head.childNodes[0]);})('https://rawgit.com/anilmeena/3678b97ca1a3036a25b3ee02d8e9df54/raw/8339714dd49bcaa78aba81893c5c137d66222900/shopify-security-badges-2-checkout.js');} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create(htmlStr) { | |
var frag = document.createDocumentFragment(), | |
temp = document.createElement('div'); | |
temp.innerHTML = htmlStr; | |
while (temp.firstChild) { | |
frag.appendChild(temp.firstChild); | |
} | |
return frag; | |
} | |
window.onload = function () { | |
var fragment2 = create('<img src="http://i.imgur.com/FvkcC1l.png" alt="safe site" class="text-center center-block" style="margin:29px 0px">'); | |
document.getElementsByClassName('main__header')[0].appendChild(fragment2); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment