NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name SpiceWorks - Deep Clean // @namespace http://srvspiceworks01/ // @version 0.6 // @description Clearing for better work // @author Steven Spyrka // @license MIT // @match http://*/* // @grant none // @include *://srvspiceworks01/tickets* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js //$ = unsafeWindow.jQuery.noConflict(true); // ==/UserScript== this.$ = this.jQuery = jQuery.noConflict(true); $(document).ready(function() { var $input = $('<div class="sui-bttn-group"><a class="sui-bttn" id="ssclose">Close</a></div>'); $("div.page-header-actions").append($input); $input.click(function(){ $("input.close-with-comment").prop('checked', true); $("button[type='submit']").trigger('click'); }); var $input2 = $('<div class="sui-bttn-group"><a class="sui-bttn" id="muteclose">Close(Mute)</a></div>'); $("div.page-header-actions").append($input2); $input2.click(function(){ $("textarea.helpdesk-comment").val(function(i, text) { return text + "#mute"; }); $("input.close-with-comment").prop('checked', true); $("button[type='submit']").trigger('click'); }); $('a.show-more-toggle').each(function(){$(this)[0].click();}); $('tbody.ticket-list > tr').each( function() { $(this).click( function() { console.log('eintrag geƤndert'); setTimeout( function(){ $('a.show-more-toggle').each(function(){$(this)[0].click();}); },500 ); } ); } ); $('nav.global-nav').hide(); $('nav.domestic-nav.affix-top').hide(); $('#container').css('padding-top','0'); (function() { document.getElementById('content_wrapper').style.paddingRight = 0; document.getElementById('community-content').style.display = 'none'; document.getElementById('community-content').style.position = 'absolute'; document.getElementById('community-content').style.top = '-1000px'; })(); });