Skip to content

Instantly share code, notes, and snippets.

@boonyasukd
Last active March 22, 2022 18:32
Show Gist options
  • Save boonyasukd/8aeeef8c1f237a3914ea717123598ebd to your computer and use it in GitHub Desktop.
Save boonyasukd/8aeeef8c1f237a3914ea717123598ebd to your computer and use it in GitHub Desktop.
hiding CloudBeds' sensitive menu items from prying eyes
// ==UserScript==
// @name CloudBeds Menu Hider
// @namespace http://tampermonkey.net/
// @version 0.1
// @description hiding CloudBeds' sensitive menu items from prying eyes
// @author boonyasukd
// @match https://hotels.cloudbeds.com/connect/10253
// @icon https://www.google.com/s2/favicons?sz=64&domain=cloudbeds.com
// @grant none
// @require https://raw.githubusercontent.com/uzairfarooq/arrive/master/minified/arrive.min.js
// ==/UserScript==
/* globals jQuery, $ */
(function () {
'use strict';
// CloudBeds is SPA, so we only need to hide them once
document.arrive('#sdashboard', { onceOnly: true }, () => {
console.log('Menu items found!');
$('#sdashboard').hide();
$('#scalendar').hide();
$('#sreservations').hide();
$('#shouse_accounts').hide();
$('#sguests').hide();
$('#smanageGear').hide();
$('#sgetHelp').hide();
$('.search-main').hide();
console.log('Finished hiding.');
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment