Merge branch 'v3'

Conflicts:
	CHANGELOG.md
	LICENSE
	builds/4chan-X.meta.js
	builds/appchan-x.user.js
	builds/crx/manifest.json
	builds/crx/script.js
	latest.js
	package.json
	src/Theming/Banner.coffee
This commit is contained in:
Zixaphir 2013-08-16 20:04:31 -07:00
commit 2abb4e96d3
5 changed files with 47 additions and 17 deletions

View File

@ -1,3 +1,6 @@
**seaweedchan**:
- Optimizations for the banner and board title code
### v2.3.3
*2013-08-16*

19
builds/4chan-X.meta.js Executable file
View File

@ -0,0 +1,19 @@
// ==UserScript==
// @name 4chan X
// @version 1.2.32
// @namespace 4chan-X
// @description Cross-browser userscript for maximum lurking on 4chan.
// @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
// @match *://api.4chan.org/*
// @match *://boards.4chan.org/*
// @match *://images.4chan.org/*
// @match *://sys.4chan.org/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_openInTab
// @run-at document-start
// @updateURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.meta.js
// @downloadURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.user.js
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC
// ==/UserScript==

View File

@ -11078,18 +11078,22 @@
$.after(banner, title);
},
cb: {
toggle: function() {
var num, type, types;
toggle: (function() {
var types;
types = {
jpg: 227,
png: 270,
gif: 253
};
type = Object.keys(types)[Math.floor(3 * Math.random())];
num = Math.floor(types[type] * Math.random());
return this.src = "//static.4chan.org/image/title/" + num + "." + type;
},
return function() {
var num, type;
type = Object.keys(types)[Math.floor(3 * Math.random())];
num = Math.floor(types[type] * Math.random());
return this.src = "//static.4chan.org/image/title/" + num + "." + type;
};
})(),
click: function(e) {
if (e.ctrlKey) {
this.contentEditable = true;

View File

@ -11070,18 +11070,22 @@
$.after(banner, title);
},
cb: {
toggle: function() {
var num, type, types;
toggle: (function() {
var types;
types = {
jpg: 227,
png: 270,
gif: 253
};
type = Object.keys(types)[Math.floor(3 * Math.random())];
num = Math.floor(types[type] * Math.random());
return this.src = "//static.4chan.org/image/title/" + num + "." + type;
},
return function() {
var num, type;
type = Object.keys(types)[Math.floor(3 * Math.random())];
num = Math.floor(types[type] * Math.random());
return this.src = "//static.4chan.org/image/title/" + num + "." + type;
};
})(),
click: function(e) {
if (e.ctrlKey) {
this.contentEditable = true;

View File

@ -30,15 +30,16 @@ Banner =
return
cb:
toggle: ->
toggle: do ->
types =
jpg: 227
png: 270
gif: 253
type = Object.keys(types)[Math.floor 3 * Math.random()]
num = Math.floor types[type] * Math.random()
@src = "//static.4chan.org/image/title/#{num}.#{type}"
->
type = Object.keys(types)[Math.floor 3 * Math.random()]
num = Math.floor types[type] * Math.random()
@src = "//static.4chan.org/image/title/#{num}.#{type}"
click: (e) ->
if e.ctrlKey
@ -88,5 +89,4 @@ Banner =
else
$.set string, cachedTest
$.set string2, cachedTest
child