Skip to content

Instantly share code, notes, and snippets.

@dijikul
Last active August 29, 2015 14:06
Show Gist options
  • Save dijikul/f237cab83d17d1296531 to your computer and use it in GitHub Desktop.
Save dijikul/f237cab83d17d1296531 to your computer and use it in GitHub Desktop.
KlipFolio CSS Tweaks
// ==UserScript==
// @name KlipFolio CSS Tweaks
// @namespace KlipFolio
// @description This script provides additional dashboard real-estate by hiding unnecessary titlebars on self-descriptive Klips.
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @version 1.3
// @match https://*.klipfolio.com/dashboard*
// ==/UserScript==
//Main Function
function hideTitles($delay) {
setTimeout(function(){
var $IDsToMinimize = [
//Red Deer Dashboard
'3278e720ad9204e3683a552c49b435b5', //Phone Stats
'f22c695a4fe89630f892a7d063b44090', //Currently Deployed
'56cdd095e3329f8057279ba73eed1434', //Abandoned Yesterday
'b5664b4c261de11c4c62ba10ca9a6398', //Need tickets Red Deer
'b5d88b86b5357fd361add4da141d3508', //Marquee
//Calgary Dashboard
'a3b4ccf5b9ef50c74c29c5e0f3126d3b', //Phone Stats
'726530e20cb18a58eaa0dc3342e5a64d', //Currently Deployed
'e81185e150c3bedfba8fac81d49007ae', //Abandoned Yesterday
'3903b5c913ec4d3ad21696358ae2f074', //Needy Tickets Calgary
'9e94df3e16f4bb261f3e164f16c6f19e', //Marque
//Snipers Dashboard
'b026c4432f8d84a25fd540f7aaf1ffcc', //Phone Stats
'd67001622a8def91763071731ffba314', //Currently dEployed
'8dec923551f1d4a1ac63ac4abafc7c9a', //Abandoned Yesterday
'c142ba4ce563a0a0c316d2d776360f3a', //Needy Tickets
'84d57235bd868854ed1f3099fa601c21', //Marquee
//Dispatch Dashboard
'a297af4b6a44b8cbaf1f1b61757bd61d', //Phone Stats
'bae538268b97a4954a736030981f5eb0', //Currently Deployed
'3641b250442cb6743336fffe92e9f367', //Abandoned YEsterday
'ac0df29bfe5c31b5a9daa68c19e92b04' //Dispatch Radar
]
var $klips = $('.klip');
$klips.each(function() {
var $title = $(this).find('.klip-toolbar-title');
var $nohover = $(this).find('.klip-toolbar-nohover');
var $klipID = $(this).attr("id");
// Code to HIDE the Title if it exists in the $IDsToMinimize Array
if ( $IDsToMinimize.indexOf( $klipID ) != -1 ) {
$title.css('display', 'none');
$nohover.css('padding', '0px');
}
});
console.log('Titles Hidden!');
}, $delay);
}
//Bind to tabclicks
$('#dashboard-tabs').on('click', '.dashboard-tab', function() {
hideTitles(3000);
});
//Lastly, run the function after the page has been loaded for 5 seconds and everything's 'popped' up.
$(window).load(function() {
hideTitles(5000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment