diff --git a/builds/4chan-X.js b/builds/4chan-X.js index fbbea8171..6dfddc037 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -10035,26 +10035,8 @@ Main = { init: function(items) { - var db, flatten, pathname, _i, _len, _ref; + var db, flatten, _i, _len; - pathname = location.pathname.split('/'); - g.BOARD = new Board(pathname[1]); - if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { - return; - } - g.VIEW = (function() { - switch (pathname[2]) { - case 'res': - return 'thread'; - case 'catalog': - return 'catalog'; - default: - return 'index'; - } - })(); - if (g.VIEW === 'thread') { - g.THREADID = +pathname[3]; - } flatten = function(parent, obj) { var key, val; @@ -10080,18 +10062,18 @@ $.get(Conf, Main.initFeatures); $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { - var _ref1; + var _ref; - return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref1 = d.readyState) === 'interactive' || _ref1 === 'complete'); + return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Main.initStyle); }, initFeatures: function(items) { - var init, pathname; + var init, pathname, _ref; Conf = items; pathname = location.pathname.split('/'); g.BOARD = new Board(pathname[1]); - if (g.BOARD.ID === 'z') { + if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { return; } g.VIEW = (function() { diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index dc33acbc4..18a08d0d1 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -10046,26 +10046,8 @@ Main = { init: function(items) { - var db, flatten, pathname, _i, _len, _ref; + var db, flatten, _i, _len; - pathname = location.pathname.split('/'); - g.BOARD = new Board(pathname[1]); - if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { - return; - } - g.VIEW = (function() { - switch (pathname[2]) { - case 'res': - return 'thread'; - case 'catalog': - return 'catalog'; - default: - return 'index'; - } - })(); - if (g.VIEW === 'thread') { - g.THREADID = +pathname[3]; - } flatten = function(parent, obj) { var key, val; @@ -10091,18 +10073,18 @@ $.get(Conf, Main.initFeatures); $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { - var _ref1; + var _ref; - return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref1 = d.readyState) === 'interactive' || _ref1 === 'complete'); + return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Main.initStyle); }, initFeatures: function(items) { - var init, pathname; + var init, pathname, _ref; Conf = items; pathname = location.pathname.split('/'); g.BOARD = new Board(pathname[1]); - if (g.BOARD.ID === 'z') { + if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { return; } g.VIEW = (function() { diff --git a/builds/crx/script.js b/builds/crx/script.js index a7fc2a930..e3b2c6027 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -10027,26 +10027,8 @@ Main = { init: function(items) { - var db, flatten, pathname, _i, _len, _ref; + var db, flatten, _i, _len; - pathname = location.pathname.split('/'); - g.BOARD = new Board(pathname[1]); - if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { - return; - } - g.VIEW = (function() { - switch (pathname[2]) { - case 'res': - return 'thread'; - case 'catalog': - return 'catalog'; - default: - return 'index'; - } - })(); - if (g.VIEW === 'thread') { - g.THREADID = +pathname[3]; - } flatten = function(parent, obj) { var key, val; @@ -10072,18 +10054,18 @@ $.get(Conf, Main.initFeatures); $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { - var _ref1; + var _ref; - return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref1 = d.readyState) === 'interactive' || _ref1 === 'complete'); + return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Main.initStyle); }, initFeatures: function(items) { - var init, pathname; + var init, pathname, _ref; Conf = items; pathname = location.pathname.split('/'); g.BOARD = new Board(pathname[1]); - if (g.BOARD.ID === 'z') { + if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { return; } g.VIEW = (function() { diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 73cb74ebe..3776a0add 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -1,19 +1,5 @@ Main = init: (items) -> - pathname = location.pathname.split '/' - g.BOARD = new Board pathname[1] - return if g.BOARD.ID in ['z', 'fk'] - g.VIEW = - switch pathname[2] - when 'res' - 'thread' - when 'catalog' - 'catalog' - else - 'index' - if g.VIEW is 'thread' - g.THREADID = +pathname[3] - # flatten Config into Conf # and get saved or default values flatten = (parent, obj) -> @@ -41,7 +27,7 @@ Main = pathname = location.pathname.split '/' g.BOARD = new Board pathname[1] - return if g.BOARD.ID is 'z' + return if g.BOARD.ID in ['z', 'fk'] g.VIEW = switch pathname[2] when 'res'