Disable CatalogSwitch without JSON Navigation

This commit is contained in:
Zixaphir 2014-03-10 07:28:40 -07:00
parent bbb41dd226
commit a8baffa972
4 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.4.1 - 2014-03-09
* 4chan X - Version 1.4.1 - 2014-03-10
*
* Licensed under the MIT license.
* https://github.com/Spittie/4chan-x/blob/master/LICENSE

View File

@ -24,7 +24,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.4.1 - 2014-03-09
* 4chan X - Version 1.4.1 - 2014-03-10
*
* Licensed under the MIT license.
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
@ -2843,6 +2843,9 @@
},
catalogSwitch: function() {
var hash;
if (!Conf['JSON Navigation']) {
return;
}
$.set('Index Mode', 'catalog');
hash = window.location.hash;
return window.location = './' + hash;

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* 4chan X - Version 1.4.1 - 2014-03-09
* 4chan X - Version 1.4.1 - 2014-03-10
*
* Licensed under the MIT license.
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
@ -2902,6 +2902,9 @@
},
catalogSwitch: function() {
var hash;
if (!Conf['JSON Navigation']) {
return;
}
$.set('Index Mode', 'catalog');
hash = window.location.hash;
return window.location = './' + hash;

View File

@ -254,6 +254,7 @@ Index =
$.event 'change', null, Index.selectSort
catalogSwitch: ->
return if !Conf['JSON Navigation']
$.set 'Index Mode', 'catalog'
{hash} = window.location
window.location = './' + hash