Merge branch 'master' into api

This commit is contained in:
Nicolas Stepien 2012-09-08 23:01:45 +02:00
commit ef92aac78d
4 changed files with 36 additions and 16 deletions

View File

@ -12,10 +12,14 @@
// @include https://images.4chan.org/*
// @include http://sys.4chan.org/*
// @include https://sys.4chan.org/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_openInTab
// @run-at document-start
// @updateURL https://github.com/MayhemYDG/4chan-x/raw/stable/4chan_x.user.js
// @downloadURL https://github.com/MayhemYDG/4chan-x/raw/stable/4chan_x.user.js
// @icon http://mayhemydg.github.com/4chan-x/favicon.gif
// @icon data:image/gif;base64,R0lGODlhEAAQAKECAAAAAGbMM////////yH5BAEKAAIALAAAAAAQABAAAAIxlI+pq+D9DAgUoFkPDlbs7lGiI2bSVnKglnJMOL6omczxVZK3dH/41AG6Lh7i6qUoAAA7
// ==/UserScript==
/* LICENSE
@ -2530,6 +2534,19 @@
Options = {
init: function() {
if (!$.get('firstrun')) {
$.set('firstrun', true);
localStorage.setItem('4chan-settings', '{"disableAll":true}');
$.ready(function() {
if (!Favicon.el) {
Favicon.init();
}
return Options.dialog();
});
}
return $.ready(Options.initReady);
},
initReady: function() {
var a, settings, _i, _len, _ref;
_ref = ['navtopright', 'navbotright'];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@ -2542,13 +2559,6 @@
$.on(a, 'click', Options.dialog);
$.prepend($.id(settings), [$.tn('['), a, $.tn('] ')]);
}
if (!$.get('firstrun')) {
if (!Favicon.el) {
Favicon.init();
}
$.set('firstrun', true);
return Options.dialog();
}
},
dialog: function() {
var arr, back, checked, description, dialog, favicon, fileInfo, filter, hiddenNum, hiddenThreads, indicator, indicators, input, key, li, obj, overlay, sauce, time, tr, ul, _i, _len, _ref, _ref1, _ref2;
@ -5025,7 +5035,7 @@
});
return;
}
$.ready(Options.init);
Options.init();
if (Conf['Quick Reply'] && Conf['Hide Original Post Form']) {
Main.css += '#postForm { display: none; }';
}

View File

@ -19,10 +19,14 @@ HEADER = """
// @include https://images.4chan.org/*
// @include http://sys.4chan.org/*
// @include https://sys.4chan.org/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_openInTab
// @run-at document-start
// @updateURL https://github.com/MayhemYDG/4chan-x/raw/stable/4chan_x.user.js
// @downloadURL https://github.com/MayhemYDG/4chan-x/raw/stable/4chan_x.user.js
// @icon http://mayhemydg.github.com/4chan-x/favicon.gif
// @icon data:image/gif;base64,R0lGODlhEAAQAKECAAAAAGbMM////////yH5BAEKAAIALAAAAAAQABAAAAIxlI+pq+D9DAgUoFkPDlbs7lGiI2bSVnKglnJMOL6omczxVZK3dH/41AG6Lh7i6qUoAAA7
// ==/UserScript==
/* LICENSE

View File

@ -6,6 +6,7 @@ master
- Quote Previewing.
- Thread Expansion.
- Comment Expansion.
Fix compatibility with Scriptish's auto-udpater.
2.34.10
- Mayhem

View File

@ -1984,6 +1984,15 @@ QR =
Options =
init: ->
unless $.get 'firstrun'
$.set 'firstrun', true
localStorage.setItem '4chan-settings', '{"disableAll":true}'
$.ready ->
# Prevent race conditions
Favicon.init() unless Favicon.el
Options.dialog()
$.ready Options.initReady
initReady: ->
for settings in ['navtopright', 'navbotright']
a = $.el 'a',
href: 'javascript:;'
@ -1991,11 +2000,7 @@ Options =
textContent: '4chan X Settings'
$.on a, 'click', Options.dialog
$.prepend $.id(settings), [$.tn('['), a, $.tn('] ')]
unless $.get 'firstrun'
# Prevent race conditions
Favicon.init() unless Favicon.el
$.set 'firstrun', true
Options.dialog()
return
dialog: ->
dialog = $.el 'div'
@ -4006,7 +4011,7 @@ Main =
location.href = url if url
return
$.ready Options.init
Options.init()
if Conf['Quick Reply'] and Conf['Hide Original Post Form']
Main.css += '#postForm { display: none; }'