Skip to content

Instantly share code, notes, and snippets.

@tzi
Created February 17, 2012 20:58
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 tzi/1855409 to your computer and use it in GitHub Desktop.
Save tzi/1855409 to your computer and use it in GitHub Desktop.
A #javascript #userscript : Add some happyness to your #ezpublish Back-Office
// ==UserScript==
// @name HappyEzPublish
// @description Add some happyness to eZ Publish Back-Office
// @id me.zilliox.HappyEzPublish
// @homepageURL http://userscripts.org/scripts/show/120420
// @supportURL http://userscripts.org/scripts/discuss/120420
// @updateURL http://userscripts.org/scripts/source/120420.meta.js
// @version 2012.02.18
// @author tzilliox
// @namespace http://zilliox.me
// @include *
// ==/UserScript==
(function(){
var execute = function(){
if (typeof window.jQuery !== 'undefined') {
var $ = window.jQuery;
if ( $('#header a[href*="/content/dashboard"][title^="eZ Publish"]').length > 0 ) {
$('#header').css({background: "url('http://zilliox.me/resource/greasmonkey/happy_ez_background.png')"});
}
}
};
var script = document.createElement("script");
script.innerHTML = '(' + execute.toString() + ')();';
document.head.appendChild(script);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment