Skip to content

Instantly share code, notes, and snippets.

@TheWebTech
Forked from spingary/hubspot_cos_bookmarklet.js
Last active March 14, 2018 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheWebTech/9b2cea1e86b20f3a9451e2a559709905 to your computer and use it in GitHub Desktop.
Save TheWebTech/9b2cea1e86b20f3a9451e2a559709905 to your computer and use it in GitHub Desktop.
Hubspot COS Helper Bookmarklet
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