diff --git a/js/disable-styles.js b/js/disable-styles.js new file mode 100644 index 00000000..c69f4e2d --- /dev/null +++ b/js/disable-styles.js @@ -0,0 +1,35 @@ +/* Adds a checkbox in the General options tab to disable and enable board style sheets. */ + +$(document).ready(function () { + var disableStyles = localStorage['disablestylesheet'] ? true : false; + /* only search for and disable board stylesheets if the user is on a page that uses them */ + if(active_page == 'ukko' || active_page == 'thread' || active_page == 'index' || active_page == 'catalog') + { + var i = 0 + while(i' + ' Disable board specific style sheets' + '') + $('#disablestyle').find('input').prop('checked', disableStyles) + } + + $('#disablestyle').on('change', function() { + if(disableStyles) { + delete localStorage.disablestylesheet + } else { + localStorage.disablestylesheet = true + } + disableStyles =! disableStyles + if(active_page == 'ukko' || active_page == 'thread' || active_page == 'index' || active_page == 'catalog') document.styleSheets[sheet].disabled = disableStyles + }) +}) diff --git a/stylesheets/style.css b/stylesheets/style.css index 4a038483..4b94d58a 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -858,7 +858,7 @@ pre { #options_div { width: 600px; - height: 300px; + height: 320px; } #alert_div {