Skip to content

Instantly share code, notes, and snippets.

@r-k-b
Last active April 11, 2017 04:33
Show Gist options
  • Save r-k-b/9675b4e353f59e968d1986bc6f7ac2a0 to your computer and use it in GitHub Desktop.
Save r-k-b/9675b4e353f59e968d1986bc6f7ac2a0 to your computer and use it in GitHub Desktop.
No Alerts When Changing Page Templates
// ==UserScript==
// @name No Alerts When Changing Page Templates
// @namespace https://gist.github.com/r-k-b
// @version 1.1.0
// @description No Alerts When Changing Page Templates
// @author Robert K. Bell <robert.k.bell@gmail.com>
// @homepage https://gist.github.com/r-k-b/9675b4e353f59e968d1986bc6f7ac2a0
// @downloadURL https://gist.github.com/r-k-b/9675b4e353f59e968d1986bc6f7ac2a0/raw/no-alerts-when-changing-bc-page-templates.user.js
// @match https://*.worldsecuresystems.com/Admin/WebPages_Detail.aspx?PageID=*
// @grant none
// @run-at document-idle
// ==/UserScript==
/* jshint esnext: true */
(function() {
'use strict';
console.info('replacing annoying page template CSS prompt...');
window.ReloadCSS = function(val) {
// do also if choosing no template so we clear classes
// var c = confirm('You have changed the template. Would you like to update the list of CSS classes available in the WYSIWYG editor?');
// if (c) __doPostBack("ctl00_cp_dropdownTemplate","");
window.updateTemplatePreviewUrl();
};
console.info('replaced.');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment