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
| var utils = window.optimizely.get('utils'); | |
| utils.waitForElement('#details > div.headerPhotoContainer > div > div > section > div > div.detail-title-container > div > div > a').then(function(element){ | |
| element.addEventListener('click',function(){ | |
| utils.waitForElement('#mytraderModal > div.modalContent.padding15.clearBoth > wc-digital-retailing').then(function(element){ | |
| document.querySelector("#mytraderModal > div.modalContent.padding15.clearBoth > wc-digital-retailing").shadowRoot.querySelector("div > div.make-scrollable > div > div.container > div:nth-child(3) > div:nth-child(3) > div > label").innerHTML = "Phone Number (Recommended)"; | |
| }); | |
| }); | |
| }); |
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
| var decisionString = window.optimizely.get('state').getDecisionString({ | |
| campaignId: campaignId, | |
| shouldCleanString: true | |
| }); | |
| var redirectInfo = window.optimizely.get('state').getRedirectInfo(); | |
| var listVar = extension.listVar; | |
| var prop = extension.prop; | |
| var delimiter = '|'; | |
| // Public Methods |
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
| // Run fetchRecos(targetId) in the console after you execute this in the console | |
| console.log("version 2.27"); | |
| function htmlToElement(html) { | |
| var template = document.createElement('template'); | |
| html = html.trim(); // Never return a text node of whitespace as the result | |
| template.innerHTML = html; | |
| return template.content.firstChild; | |
| } |
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
| var utils = optimizely.get('utils'); | |
| var recommender = optimizely.get('recommender'); | |
| // This boolean tells whether you are in the editor, so that you can special case if needed. | |
| var editorMode = !!window.optimizely_p13n_inner || | |
| window.location != window.parent.location && | |
| window.location.search.indexOf('optimizely_editor') > -1, | |
| logEnabled = editorMode || window.localStorage.getItem('logRecs'); | |
| var log = function() { |
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
| { | |
| "plugin_type": "widget", | |
| "name": "Video Popup", | |
| "edit_page_url": "https://robisatthefunction.github.io/mockWebsite/index.html", | |
| "form_schema": [ | |
| { | |
| "default_value": "#000000", | |
| "field_type": "color", | |
| "name": "fgcolor", | |
| "label": "Text Color", |
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
| window.dcpAttributes = undefined; | |
| function onActivated() { | |
| var utils = window.optimizely.get('utils'); | |
| var visitorId = window.optimizely.get('visitor').visitorId; | |
| var projectId = window.optimizely.get('data').projectId; | |
| // [MUST CHANGE] add customer DCP table ID here | |
| var datatasource = undefined; | |
| // [MUST CHANGE] change window.customerID to variable they are using |
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 () { | |
| window['optimizely'] = window['optimizely'] || []; | |
| var utils = window["optimizely"].get('utils'); | |
| utils.waitUntil(function () { | |
| return utag.data; | |
| }).then(function () { | |
| window.optimizely = window.optimizely || []; | |
| window.optimizely.push({ | |
| "type": "user", | |
| "attributes": utag.data // filter down |
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
| window.searchVariation = function () { | |
| if (document.readyState === "loading" || document.readyState === "uninitialized") { | |
| document.addEventListener("DOMContentLoaded", addSearch); | |
| } else { | |
| when("nav.gnav", function () { | |
| if (!document.querySelector(".subnav-menu") && !document.querySelector(".ods-18792435885-menu")) { | |
| addBar(); | |
| } else { | |
| grabData(); | |
| } |
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
| window.searchVariation(); |
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
| document.addEventListener('DOMContentLoaded', function() { | |
| }); |