Remove redundancy

This commit is contained in:
seaweedchan 2013-08-13 00:41:04 -07:00
parent b8062b0323
commit eeb6ee22a4
3 changed files with 2 additions and 51 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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) ->