Type: js
om-vue.js
// Using Vue Router. import Vue from ‘vue’; import Router from ‘vue-router’; Vue.use(Router); const router = new Router ({ // Your vue router settings. }); router.beforeEach((to, from, next) => { if (window.om5678_1234) { window.om5678_1234.reset(); } next(); }); export default router;Continue reading
Dynamic Monsterlinks by Id
// Target by ID window.onload = function(){ document.getElementById(“someID”).href=”MONSTERLINK_URL”; }Continue reading
Dynamic Monsterlinks By Class Name
// Target by class name window.onload = function(){ const dynamicMonsterLinks = document.querySelectorAll(“a.myClass”); dynamicMonsterLinks.forEach(dynamicMonsterLinks => dynamicMonsterLinks.href = “MONSTERLINK_URL”); }Continue reading
Fading Page Transitions
document.addEventListener(“DOMContentLoaded”, function() { // Create and insert CSS styles for fade-in and fade-out const style = document.createElement(‘style’); style.innerHTML = ` .fade-out { opacity: 0; transition: opacity 0.5s ease-in-out; } .fade-in { opacity: 1; transition: opacity 0.5s ease-in-out; } `; document.head.appendChild(style);…Continue reading
Smooth Scrolling for Anchor Links
document.addEventListener(‘click’, function(e) { // Check if the clicked element is an anchor with href starting with ‘#’ if (e.target.tagName === ‘A’ && e.target.getAttribute(‘href’) && e.target.getAttribute(‘href’).startsWith(‘#’)) { e.preventDefault(); const targetId = e.target.getAttribute(‘href’).slice(1); // Remove the ‘#’ from the href const targetElement…Continue reading
Untitled Snippet
// Get the butterflies container const butterfliesContainer = document.querySelector(‘.butterflies’); // Create a function to generate a butterfly function createButterfly() { const butterfly = document.createElement(‘div’); butterfly.className = ‘butterfly’; butterfliesContainer.appendChild(butterfly); return butterfly; } // Create multiple butterflies for (let i = 0;…Continue reading
Admin/Nav Extension – JS
jQuery(function($) { var $page_title = $(“#wpbody-content > .wrap > h1”); var $current_menu_item = $(“#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu”); if ($current_menu_item.length == 1) { var $menu_links = []; var $submenu = $current_menu_item.parent().find(“ul > li > a”); var $header_nav = $(“ “).addClass(“mx_nav”); var $title…Continue reading
Auto Google Ad – (Non-R19)
document.addEventListener(“DOMContentLoaded”, function () { function excludeChap() { const scripts = document.getElementsByTagName(‘script’); const scriptsArray = Array.from(scripts); // Loop through each script element scriptsArray.forEach(script => { // Check if the script’s content or src attribute contains the specific string if (script.innerHTML.includes(‘1810952886731558’) ||…Continue reading
Pubfuture – 10th 20th 30th R19
document.addEventListener(“DOMContentLoaded”, function() { let breadcrumbs = document.querySelectorAll(‘.breadcrumb li’); let containsR19 = false; for (let i = 0; i < breadcrumbs.length; i++) { if (breadcrumbs[i].classList.contains('active') && (breadcrumbs[i].textContent.includes('R19') || breadcrumbs[i].textContent.includes('R-19') || breadcrumbs[i].textContent.includes('R 19'))) { containsR19 = true; break; } } if (containsR19)…Continue reading