From a43aea527e261acd2c64061a32a0e01648b38ef3 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 30 Aug 2012 03:03:37 +0200 Subject: [PATCH] Disable 4chan's feature. Disable 4chan's mobile layout. --- 4chan_x.user.js | 8 ++++++-- script.coffee | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 8af78e5f7..12e18cb98 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -693,10 +693,11 @@ className: 'reply', innerHTML: '
' }); + localStorage.setItem('4chan_settings', false); return $.ready(Main.initHeaderReady); }, initHeaderReady: function() { - var header, nav, settings, _ref, _ref1; + var header, nav, settings, _ref, _ref1, _ref2; if (!$.id('navtopr')) { return; } @@ -718,7 +719,10 @@ } $.addClass(d.body, $.engine); $.addClass(d.body, 'fourchan_x'); - return (_ref1 = $.id('boardNavDesktopFoot')) != null ? _ref1.hidden = true : void 0; + if ((_ref1 = $('link[href*=mobile]', d.head)) != null) { + _ref1.disabled = true; + } + return (_ref2 = $.id('boardNavDesktopFoot')) != null ? _ref2.hidden = true : void 0; }, initFeatures: function() { return $.ready(Main.initFeaturesReady); diff --git a/script.coffee b/script.coffee index 9f7c85e32..d62464fda 100644 --- a/script.coffee +++ b/script.coffee @@ -535,6 +535,8 @@ Main = Main.header = $.el 'div', className: 'reply' innerHTML: '
' + # disable 4chan's features + localStorage.setItem '4chan_settings', false $.ready Main.initHeaderReady initHeaderReady: -> return unless $.id 'navtopr' @@ -556,6 +558,8 @@ Main = $.addClass d.body, $.engine $.addClass d.body, 'fourchan_x' + # disable the mobile layout + $('link[href*=mobile]', d.head)?.disabled = true $.id('boardNavDesktopFoot')?.hidden = true initFeatures: ->