Forked from spingary/hubspot_cos_bookmarklet.js
Last active
March 14, 2018 14:20
Hubspot COS Helper Bookmarklet
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() { | |
var link = document.createElement("link"); | |
link.href = "https://rawgit.com/spingary/060fcc7924ccdd21cc1b/raw/hubspot_cos_help_styles.css"; | |
link.type = "text/css"; | |
link.rel = "stylesheet"; | |
var linkb = link.cloneNode(true); | |
document.getElementsByTagName("head")[0].appendChild(link); | |
var frame = window.frames['design-manager-iframe']; | |
var contents = jQuery(frame).contents(); | |
jQuery('head',contents).append(linkb); | |
var hubID = jQuery('.nav-hubid').text().replace("Hub ID: ",""); | |
jQuery('#nav-dropdown-item-landing-pages').after('<li id="nav-dorpdown-item-staging" data-mainitemid="content" class="nav-dropdown-item"><a href="https://app.hubspot.com/content/'+hubID+'/staging"><span coass="child-link-text link-text-after-parent-item-content">Content Staging</span></a></li>'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment