Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Hide items from the admin menu in Pancake (
// this works as of 6 Nov 2014, Pancake 4.6.10
// set the names of menu items you want to hide here (either the href or text content of each top-level link)
var itemsToHide = ["#proposals", "credit notes"];
$( document ).ready(function(){
// run again after Pancake's JS has run
setTimeout(hideMenuItems, 50);
function hideMenuItems(){
$(".top-bar ul.left .js-not-more-li").each(function(){
var aTag = $(this).find('a');
var href= aTag.attr('href');
var text = aTag.text().toLowerCase();
if(itemsToHide.indexOf(href) != -1 || itemsToHide.indexOf(text) != -1){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.