This file contains 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
javascript:!function(){for(var e=document.querySelectorAll("#services-section .category-services-container"),t=[],r=0;r<e.length;r++){var a=e[r],o=[],n=[],l=a.querySelector(":first-child span");if(l){var c=l.textContent;o.push(c.substring(0,c.length-1))}var i=a.querySelector(".view-button");i&&i.click();for(var v=a.querySelectorAll(".btn-related-category"),s=0;s<v.length;s++){var h=v[s];n.push(h.textContent)}for(var u=0;u<n.length;u++)t.push([o[0],n[u]])}for(var d="Container Label,Category\n",y=0;y<t.length;y++){var g=t[y];d+=g[0]+","+g[1]+"\n"}var p=document.createElement("textarea");p.value=d,document.body.appendChild(p),p.select(),document.execCommand("copy"),document.body.removeChild(p),alert("Data copied to clipboard")}(); |
This file contains 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
javascript:!function e(){let t=document.querySelector("main ol");if(t)!function e(t){let o=Array.from(t.querySelectorAll("li")).map(e=>{let t=e.querySelector("span:nth-child(2)").textContent.trim(),o=e.querySelector("span:nth-child(3)").textContent.trim();return{Keyword:t,"Search Volume":o}}),r=o.map(e=>Object.values(e).join(";")).join("\n");navigator.clipboard.writeText("Keyword;Search Volume\n"+r).then(()=>{alert("Keyword and Search Volume data copied to clipboard with headers")}).catch(e=>{alert("Failed to copy data to clipboard:\n"+e)})}(t);else{let o=document.querySelector('iframe[src*="/local/business/"]');if(o){let r=o.getAttribute("src");window.open(r,"_blank")}else alert("Ordered list not found inside main tag and no matching iframe found.")}}(); |
This file contains 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
javascript:(function(){ | |
const folderID = "GOOGLE_DRIVE_FOLDER_ID"; | |
var userInput = prompt("What would you like to search for?"); | |
if(userInput){ | |
userInput = encodeURIComponent(userInput); | |
var url = "https://drive.google.com/drive/u/0/search?q=" + userInput + "%20in:" + folderID; | |
window.location.href = url; | |
} | |
})(); |
This file contains 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
const isElementOrParentMatched = (element, selectors) => { | |
let currentElement = element; | |
while(currentElement) { | |
for (let selector of selectors) { | |
if ($(currentElement).is(selector)) { | |
return true; | |
} | |
} | |
currentElement = currentElement.parentElement; | |
} |
This file contains 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
const isElementOrParentMatched = (element, selectors) => { | |
let currentElement = element; | |
while(currentElement) { | |
for (let selector of selectors) { | |
if ($(currentElement).is(selector)) { | |
return true; | |
} | |
} | |
currentElement = currentElement.parentElement; | |
} |
This file contains 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
// Get the <body> element | |
const bodyElement = document.querySelector('body'); | |
// Extract all classes on the <body> element | |
const bodyClasses = Array.from(bodyElement.classList); | |
// Join the classes into a comma separated string | |
const bodyClassesString = bodyClasses.join(','); | |
return bodyClassesString; |
This file contains 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
## Exclude Element with ID (replace div with any tag) | |
and not(ancestor::div[@id='MyID']) | |
## Exclude Element with Class | |
and not(ancestor::body[contains(@class, 'My-Class')]) | |
## Exclude Element with Attribute (replace div or attribute/value as needed) | |
and not(ancestor::div[@data-elementor-type='header']) | |
and not(ancestor::div[@data-id='981cb']) |
This file contains 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
/** | |
* Add Page Attrribute Terms (Taxonomy) to Body Tag | |
*/ | |
function pro_page_attributes_class_to_body( $classes ){ | |
if ( $pageTaxonomy = get_the_terms( get_the_ID(), 'page_attributes' ) ) { | |
foreach( $taxonomyTerm as $term ){ | |
if(is_array($term)){ | |
if(!empty($term['slug'])){ | |
$termClass = 'page-attribute-' . $term['slug']; | |
array_push( $classes, $termClass ); |
This file contains 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 add_page_attributes_taxonomy() { | |
$args = array( | |
'label' => __( 'Page Attributes', 'textdomain' ), | |
'public' => false, | |
'rewrite' => false, | |
'hierarchical' => false, | |
'show_ui' => true, | |
'show_in_quick_edit' => true, // Added this line to show in Quick Edit | |
'show_admin_column' => true, | |
); |
This file contains 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
/** | |
* Add Page Terms (Taxonomy) to Body Tag | |
*/ | |
function pro_page_taxonomy_class_to_body( $classes ){ | |
if ( $pageTaxonomy = get_the_terms( get_the_ID(), 'my_taxonomy_slug' ) ) { | |
foreach( $taxonomyTerm as $term ){ | |
if(is_array($term)){ | |
if(!empty($term['slug'])){ | |
$termClass = 'mytaxonomy-' . $term['slug']; | |
array_push( $classes, $termClass ); |
NewerOlder