om-custom-redirect-all-close.js

jQuery(document).ready(function($){ function omRedirect() { var url = “https://optinmonster.com”; $(location).attr(‘href’,url); } $(document).on(‘OptinMonsterOnClose’, function(event, data, object){ omRedirect(); }); });Continue reading

Untitled Snippet (copy)

(self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: “NewsArticle”, isPartOfType: [“Product”], isPartOfProductId: “CAow7ue8DA:openaccess”, clientOptions: { theme: “light”, lang: “id” }, }); }); </scriptContinue reading

Untitled Snippet

(self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: “NewsArticle”, isPartOfType: [“Product”], isPartOfProductId: “CAow7ue8DA:openaccess”, clientOptions: { theme: “light”, lang: “id” }, }); });Continue reading

3D Viewer Tracking

document.addEventListener(‘DOMContentLoaded’, function() { const viewerCanvas = document.querySelector(‘.userInput canvas’); if (!viewerCanvas) return; // track when user starts grabbing viewerCanvas.addEventListener(‘mousedown’, function() { if (typeof gtag === ‘function’) { gtag(‘event’, ‘grab_start_3d’, { event_category: ‘Viewer 3D’, event_label: ‘mousedown’ }); } }); // track when…Continue reading

trigger monsterlink of an external link

jQuery(document).ready(function($){ // Change ‘rt78pcbzrddo1y7w0yq3’ to match your specific campaign slug var campaignSlug = ‘rt78pcbzrddo1y7w0yq3’; // When any link contains ‘external’ in the rel attribute $(‘a[rel*=external]’).on(‘mouseover’, function() { window[‘om’ + campaignSlug].startShow(); }); });Continue reading

trigger spesific monsterlink on hover

jQuery(document).ready(function($){ // Change ‘rt78pcbzrddo1y7w0yq3’ to match your specific campaign slug var campaignSlug = ‘rt78pcbzrddo1y7w0yq3’; // When hovering over any element with the ‘.content’ class – change as you require $(‘.content’).on(‘mouseover’, function() { window[‘om’ + campaignSlug].startShow(); }); });Continue reading

trigger monsterlink on hover

jQuery(document).ready(function($){ // Change ‘rt78pcbzrddo1y7w0yq3’ to match your specific campaign slug var campaignSlug = ‘rt78pcbzrddo1y7w0yq3’; $(‘body’).on(‘mouseover’, ‘[href=”https://app.monstercampaigns.com/c/’ + campaignSlug + ‘/”]’, function() { window[‘om’ + campaignSlug].startShow(); }); });Continue reading

Remove Decimal Points In Suggested (US)

document.addEventListener(‘DOMContentLoaded’, function () { // Select all span elements inside the ul with the class ‘donation-amounts’ const amountSpans = document.querySelectorAll(‘.donation-amounts span.amount’); amountSpans.forEach(span => { // Get the current text content let value = span.textContent; // Find the index of the…Continue reading