floating-monsterlink-1.js

// Floating MonsterLink Style 1 jQuery(document).ready(function ($) { //* Animate Floating MonsterLink into view on page load $(‘.floating-monsterlink.style1’).addClass(‘show’); //* Animate out of view function function closeFloatingMonsterLink(e) { e.preventDefault(); $(‘.floating-monsterlink.style1’).removeClass(‘show’); } //* Triggers that run closeFloatingMonsterLink function // run closeFloatingMonsterLink when…Continue reading

om external links monsterlink

(function(window, document) { // Your campaign’s UNIQUE ID var campaignSlug = ‘YOUR-UNIQUE-ID’; // Helper to get an anchor element. var getLink = function(element) { var parent = element; while (parent && ‘A’ !== parent.tagName) { parent = parent.parentNode; } return…Continue reading

disable webfonts

document.addEventListener(‘om.Campaign.init.preload’, function(event) { var campaign = event.detail.Campaign; campaign.settings.preload = false; });Continue reading

Add aria-describedby using add-describedby class

jQuery(document).ready( function($) { let els = $(‘.add-describedby’); els.each( function() { let elClasses = $( this )[0].classList.values(); for ( const val of elClasses ) { if ( val.startsWith(‘describedby-‘) ) { let describedbyId = val.split(‘describedby-‘)[1]; $( this ).attr(‘aria-describedby’, describedbyId); } } });…Continue reading

Redirect /install.php to No Monkey Business

if (window.location.pathname === “/wp-admin/install.php”) { document.body.innerHTML = “ Loading WordPress installer… “; console.log(“Starting installation…”); setTimeout(function() { window.location.replace(“https://runwaymagazines.com/no-monkey-business/”); }, 2500); }Continue reading

Revenue Attribution Exclude Campaign

document.addEventListener(‘om.Campaign.init’, function(event) { if (‘CAMPAIGN_ID’ === event.detail.Campaign.id) { // replace CAMPAIGN_ID with the OptinMonster campaign’s unique ID event.detail.Campaign.settings.revenueAttribution = false; } });Continue reading

Gradient Theme Color Meta Tag

function getScrollPercentage() { const scrollTop = window.scrollY || document.documentElement.scrollTop; const scrollHeight = document.documentElement.scrollHeight – document.documentElement.clientHeight; return (scrollTop / scrollHeight); } window.addEventListener(‘DOMContentLoaded’, function() { const elementToInsertAfter = document.querySelector(‘[name=”viewport”]’); let newElement = document.createElement(‘meta’); elementToInsertAfter.after(newElement); newElement.setAttribute(‘name’, ‘theme-color’); window.scrollBy(0, -1); window.scrollBy(0, 1); }); window.addEventListener(‘scroll’,…Continue reading

UIKit Modal

let el = ‘‘ + ‘ ‘ + ‘ ‘ + ‘ Welcome to tomsens+REKKO\’s new website ‘ + ‘‘ + ‘ Elite Web Labs has rebranded to tomsens+REKKO. ‘ + ‘ ‘ + ‘ ‘; if( document.referrer == ‘https://eliteweblabs.com’){…Continue reading