Remove redundancy
This commit is contained in:
parent
b8062b0323
commit
eeb6ee22a4
@ -10339,25 +10339,7 @@
|
||||
|
||||
Main = {
|
||||
init: function() {
|
||||
var db, flatten, pathname, _i, _len, _ref;
|
||||
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];
|
||||
}
|
||||
var db, flatten, _i, _len;
|
||||
flatten = function(parent, obj) {
|
||||
var key, val;
|
||||
if (obj instanceof Array) {
|
||||
|
||||
@ -10324,25 +10324,7 @@
|
||||
|
||||
Main = {
|
||||
init: function() {
|
||||
var db, flatten, pathname, _i, _len, _ref;
|
||||
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];
|
||||
}
|
||||
var db, flatten, _i, _len;
|
||||
flatten = function(parent, obj) {
|
||||
var key, val;
|
||||
if (obj instanceof Array) {
|
||||
|
||||
@ -1,18 +1,5 @@
|
||||
Main =
|
||||
init: ->
|
||||
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) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user