Merge branch 'master' into v3
This commit is contained in:
commit
cd687215e7
@ -165,7 +165,7 @@
|
|||||||
filesize: [''].join('\n'),
|
filesize: [''].join('\n'),
|
||||||
md5: [''].join('\n')
|
md5: [''].join('\n')
|
||||||
},
|
},
|
||||||
sauces: ['http://iqdb.org/?url=$turl', 'http://www.google.com/searchbyimage?image_url=$turl', '#http://tineye.com/search?url=$turl', '#http://saucenao.com/search.php?db=999&url=$turl', '#http://3d.iqdb.org/?url=$turl', '#http://regex.info/exif.cgi?imgurl=$url', '# uploaders:', '#http://imgur.com/upload?url=$url;text:Upload to imgur', '#http://omploader.org/upload?url1=$url;text:Upload to omploader', '# "View Same" in archives:', '#http://archive.foolz.us/search/image/$md5/;text:View same on foolz', '#http://archive.foolz.us/$board/search/image/$md5/;text:View same on foolz /$board/', '#https://archive.installgentoo.net/$board/image/$md5;text:View same on installgentoo /$board/'].join('\n'),
|
sauces: ['http://iqdb.org/?url=$turl', 'http://www.google.com/searchbyimage?image_url=$turl', '#http://tineye.com/search?url=$turl', '#http://saucenao.com/search.php?db=999&url=$turl', '#http://3d.iqdb.org/?url=$turl', '#http://regex.info/exif.cgi?imgurl=$url', '# uploaders:', '#http://imgur.com/upload?url=$url;text:Upload to imgur', '#http://omploader.org/upload?url1=$url;text:Upload to omploader', '# "View Same" in archives:', '#http://archive.foolz.us/_/search/image/$md5/;text:View same on foolz', '#http://archive.foolz.us/$board/search/image/$md5/;text:View same on foolz /$board/', '#https://archive.installgentoo.net/$board/image/$md5;text:View same on installgentoo /$board/'].join('\n'),
|
||||||
time: '%m/%d/%y(%a)%H:%M:%S',
|
time: '%m/%d/%y(%a)%H:%M:%S',
|
||||||
backlink: '>>%id',
|
backlink: '>>%id',
|
||||||
fileInfo: '%l (%p%s, %r)',
|
fileInfo: '%l (%p%s, %r)',
|
||||||
@ -424,7 +424,7 @@
|
|||||||
style = $.el('style', {
|
style = $.el('style', {
|
||||||
textContent: css
|
textContent: css
|
||||||
});
|
});
|
||||||
$.add(d.head, style);
|
$.add(d.head || d.documentElement, style);
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
x: function(path, root) {
|
x: function(path, root) {
|
||||||
@ -891,7 +891,6 @@
|
|||||||
}
|
}
|
||||||
switch (location.hostname) {
|
switch (location.hostname) {
|
||||||
case 'boards.4chan.org':
|
case 'boards.4chan.org':
|
||||||
Main.addStyle();
|
|
||||||
Main.initHeader();
|
Main.initHeader();
|
||||||
return Main.initFeatures();
|
return Main.initFeatures();
|
||||||
case 'sys.4chan.org':
|
case 'sys.4chan.org':
|
||||||
@ -910,6 +909,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
initHeader: function() {
|
initHeader: function() {
|
||||||
|
$.addStyle(Main.css);
|
||||||
Main.header = $.el('div', {
|
Main.header = $.el('div', {
|
||||||
className: 'reply',
|
className: 'reply',
|
||||||
innerHTML: '<div class=extra></div>'
|
innerHTML: '<div class=extra></div>'
|
||||||
@ -1087,15 +1087,7 @@
|
|||||||
settings: function() {
|
settings: function() {
|
||||||
return alert('Here be settings');
|
return alert('Here be settings');
|
||||||
},
|
},
|
||||||
addStyle: function() {
|
css: "/* general */\n.dialog.reply {\n display: block;\n border: 1px solid rgba(0, 0, 0, .25);\n padding: 0;\n}\n.move {\n cursor: move;\n}\nlabel {\n cursor: pointer;\n}\na[href=\"javascript:;\"] {\n text-decoration: none;\n}\n.warning {\n color: red;\n}\n\n/* 4chan style fixes */\n.opContainer, .op {\n display: block !important;\n}\n.post {\n overflow: visible !important;\n}\n\n/* header */\nbody.fourchan_x {\n margin-top: 2.5em;\n}\n#boardNavDesktop.reply {\n border-width: 0 0 1px;\n padding: 4px;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n transition: opacity .1s ease-in-out;\n -o-transition: opacity .1s ease-in-out;\n -moz-transition: opacity .1s ease-in-out;\n -webkit-transition: opacity .1s ease-in-out;\n z-index: 1;\n}\n#boardNavDesktop.reply:not(:hover) {\n opacity: .4;\n transition: opacity 1.5s .5s ease-in-out;\n -o-transition: opacity 1.5s .5s ease-in-out;\n -moz-transition: opacity 1.5s .5s ease-in-out;\n -webkit-transition: opacity 1.5s .5s ease-in-out;\n}\n#boardNavDesktop.reply a {\n margin: -1px;\n}\n#settings {\n float: right;\n}\n\n/* quote */\n.quotelink.deadlink {\n text-decoration: underline !important;\n}\n.deadlink:not(.quotelink) {\n text-decoration: none !important;\n}\n.inlined {\n opacity: .5;\n}\n#qp input, .forwarded {\n display: none;\n}\n.quotelink.forwardlink,\n.backlink.forwardlink {\n text-decoration: none;\n border-bottom: 1px dashed;\n}\n.inline {\n border: 1px solid rgba(128, 128, 128, .5);\n display: table;\n margin: 2px 0;\n}\n.inline .post {\n border: 0 !important;\n display: table !important;\n margin: 0 !important;\n padding: 1px 2px !important;\n}\n#qp {\n position: fixed;\n padding: 2px 2px 5px;\n}\n#qp .post {\n border: none;\n margin: 0;\n padding: 0;\n}\n#qp img {\n max-height: 300px;\n max-width: 500px;\n}\n.qphl {\n outline: 2px solid rgba(216, 94, 49, .7);\n}\n\n/* file */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull {\n display: none;\n}\n#ihover {\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n max-height: 100%;\n max-width: 75%;\n position: fixed;\n padding-bottom: 16px;\n}"
|
||||||
$.off(d, 'DOMNodeInserted', Main.addStyle);
|
|
||||||
if (d.head) {
|
|
||||||
return $.addStyle(Main.css);
|
|
||||||
} else {
|
|
||||||
return $.on(d, 'DOMNodeInserted', Main.addStyle);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
css: "/* general */\n.dialog.reply {\n display: block;\n border: 1px solid rgba(0, 0, 0, .25);\n padding: 0;\n}\n.move {\n cursor: move;\n}\nlabel {\n cursor: pointer;\n}\na[href=\"javascript:;\"] {\n text-decoration: none;\n}\n.warning {\n color: red;\n}\n\n/* 4chan style fixes */\n.opContainer, .op {\n display: block !important;\n}\n.post {\n overflow: visible !important;\n}\n\n/* header */\nbody.fourchan_x {\n margin-top: 2.5em;\n}\n#boardNavDesktop.reply {\n border-width: 0 0 1px;\n padding: 4px;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n transition: opacity .1s ease-in-out;\n -o-transition: opacity .1s ease-in-out;\n -moz-transition: opacity .1s ease-in-out;\n -webkit-transition: opacity .1s ease-in-out;\n z-index: 1;\n}\n#boardNavDesktop.reply:not(:hover) {\n opacity: .4;\n transition: opacity 1.5s .5s ease-in-out;\n -o-transition: opacity 1.5s .5s ease-in-out;\n -moz-transition: opacity 1.5s .5s ease-in-out;\n -webkit-transition: opacity 1.5s .5s ease-in-out;\n}\n#boardNavDesktop.reply a {\n margin: -1px;\n}\n#settings {\n float: right;\n}\n\n/* quote */\n.quotelink.deadlink {\n text-decoration: underline !important;\n}\n.inlined {\n opacity: .5;\n}\n#qp input, .forwarded {\n display: none;\n}\n.quotelink.forwardlink,\n.backlink.forwardlink {\n text-decoration: none;\n border-bottom: 1px dashed;\n}\n.inline {\n border: 1px solid rgba(128, 128, 128, .5);\n display: table;\n margin: 2px 0;\n}\n.inline .post {\n border: 0 !important;\n display: table !important;\n margin: 0 !important;\n padding: 1px 2px !important;\n}\n#qp {\n position: fixed;\n padding: 2px 2px 5px;\n}\n#qp .post {\n border: none;\n margin: 0;\n padding: 0;\n}\n#qp img {\n max-height: 300px;\n max-width: 500px;\n}\n.qphl {\n outline: 2px solid rgba(216, 94, 49, .7);\n}\n\n/* file */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull {\n display: none;\n}\n#ihover {\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n max-height: 100%;\n max-width: 75%;\n position: fixed;\n padding-bottom: 16px;\n}"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Redirect = {
|
Redirect = {
|
||||||
@ -1149,10 +1141,10 @@
|
|||||||
case 'wsg':
|
case 'wsg':
|
||||||
case 'dev':
|
case 'dev':
|
||||||
case 'foolz':
|
case 'foolz':
|
||||||
return "//archive.foolz.us/api/chan/post/board/" + board + "/num/" + postID + "/format/json";
|
return "//archive.foolz.us/_/api/chan/post/?board=" + board + "&num=" + postID;
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'kuku':
|
case 'kuku':
|
||||||
return "//nsfw.foolz.us/api/chan/post/board/" + board + "/num/" + postID + "/format/json";
|
return "//nsfw.foolz.us/_/api/chan/post/?board=" + board + "&num=" + postID;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
thread: function(board, threadID, postID) {
|
thread: function(board, threadID, postID) {
|
||||||
@ -1259,7 +1251,7 @@
|
|||||||
capcode: data.capcode,
|
capcode: data.capcode,
|
||||||
tripcode: data.trip,
|
tripcode: data.trip,
|
||||||
uniqueID: data.id,
|
uniqueID: data.id,
|
||||||
email: data.email ? encodeURIComponent(data.email) : '',
|
email: data.email ? encodeURIComponent(data.email.replace(/"/g, '"')) : '',
|
||||||
subject: data.sub,
|
subject: data.sub,
|
||||||
flagCode: data.country,
|
flagCode: data.country,
|
||||||
flagName: data.country_name,
|
flagName: data.country_name,
|
||||||
@ -1315,7 +1307,7 @@
|
|||||||
break;
|
break;
|
||||||
case 'mod':
|
case 'mod':
|
||||||
capcodeClass = " capcodeMod";
|
capcodeClass = " capcodeMod";
|
||||||
capcodeStart = " <strong class='capcode hand id_mod' " + "title='Highlight posts by Moderators'>## Moderator</strong>";
|
capcodeStart = " <strong class='capcode hand id_mod' " + "title='Highlight posts by Moderators'>## Mod</strong>";
|
||||||
capcode = (" <img src='" + staticPath + "/image/modicon.gif' ") + "alt='This user is a 4chan Moderator.' " + "title='This user is a 4chan Moderator.' class=identityIcon>";
|
capcode = (" <img src='" + staticPath + "/image/modicon.gif' ") + "alt='This user is a 4chan Moderator.' " + "title='This user is a 4chan Moderator.' class=identityIcon>";
|
||||||
break;
|
break;
|
||||||
case 'developer':
|
case 'developer':
|
||||||
@ -1554,7 +1546,7 @@
|
|||||||
})(),
|
})(),
|
||||||
tripcode: data.trip,
|
tripcode: data.trip,
|
||||||
uniqueID: data.poster_hash,
|
uniqueID: data.poster_hash,
|
||||||
email: encodeURIComponent(data.email),
|
email: data.email ? encodeURIComponent(data.email) : '',
|
||||||
subject: data.title_processed,
|
subject: data.title_processed,
|
||||||
flagCode: data.poster_country,
|
flagCode: data.poster_country,
|
||||||
flagName: data.poster_country_name_processed,
|
flagName: data.poster_country_name_processed,
|
||||||
|
|||||||
@ -5,6 +5,8 @@ alpha
|
|||||||
Fix Quote Highlighting not affecting inlined quotes.
|
Fix Quote Highlighting not affecting inlined quotes.
|
||||||
|
|
||||||
master
|
master
|
||||||
|
|
||||||
|
2.35.0
|
||||||
- Mayhem
|
- Mayhem
|
||||||
Use 4chan's API to fetch posts for:
|
Use 4chan's API to fetch posts for:
|
||||||
- Thread Updater.
|
- Thread Updater.
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
postMessage({version:'2.34.10'},'*')
|
postMessage({version:'2.35.0'},'*')
|
||||||
@ -116,7 +116,7 @@ Config =
|
|||||||
'#http://imgur.com/upload?url=$url;text:Upload to imgur'
|
'#http://imgur.com/upload?url=$url;text:Upload to imgur'
|
||||||
'#http://omploader.org/upload?url1=$url;text:Upload to omploader'
|
'#http://omploader.org/upload?url1=$url;text:Upload to omploader'
|
||||||
'# "View Same" in archives:'
|
'# "View Same" in archives:'
|
||||||
'#http://archive.foolz.us/search/image/$md5/;text:View same on foolz'
|
'#http://archive.foolz.us/_/search/image/$md5/;text:View same on foolz'
|
||||||
'#http://archive.foolz.us/$board/search/image/$md5/;text:View same on foolz /$board/'
|
'#http://archive.foolz.us/$board/search/image/$md5/;text:View same on foolz /$board/'
|
||||||
'#https://archive.installgentoo.net/$board/image/$md5;text:View same on installgentoo /$board/'
|
'#https://archive.installgentoo.net/$board/image/$md5;text:View same on installgentoo /$board/'
|
||||||
].join '\n'
|
].join '\n'
|
||||||
@ -324,7 +324,8 @@ $.extend $,
|
|||||||
addStyle: (css) ->
|
addStyle: (css) ->
|
||||||
style = $.el 'style',
|
style = $.el 'style',
|
||||||
textContent: css
|
textContent: css
|
||||||
$.add d.head, style
|
# XXX Only Chrome has no d.head on document-start.
|
||||||
|
$.add d.head or d.documentElement, style
|
||||||
style
|
style
|
||||||
x: (path, root=d.body) ->
|
x: (path, root=d.body) ->
|
||||||
# XPathResult.ANY_UNORDERED_NODE_TYPE === 8
|
# XPathResult.ANY_UNORDERED_NODE_TYPE === 8
|
||||||
@ -700,7 +701,6 @@ Main =
|
|||||||
|
|
||||||
switch location.hostname
|
switch location.hostname
|
||||||
when 'boards.4chan.org'
|
when 'boards.4chan.org'
|
||||||
Main.addStyle()
|
|
||||||
Main.initHeader()
|
Main.initHeader()
|
||||||
Main.initFeatures()
|
Main.initFeatures()
|
||||||
when 'sys.4chan.org'
|
when 'sys.4chan.org'
|
||||||
@ -714,6 +714,7 @@ Main =
|
|||||||
return
|
return
|
||||||
|
|
||||||
initHeader: ->
|
initHeader: ->
|
||||||
|
$.addStyle Main.css
|
||||||
Main.header = $.el 'div',
|
Main.header = $.el 'div',
|
||||||
className: 'reply'
|
className: 'reply'
|
||||||
innerHTML: '<div class=extra></div>'
|
innerHTML: '<div class=extra></div>'
|
||||||
@ -872,13 +873,6 @@ Main =
|
|||||||
|
|
||||||
settings: ->
|
settings: ->
|
||||||
alert 'Here be settings'
|
alert 'Here be settings'
|
||||||
|
|
||||||
addStyle: ->
|
|
||||||
$.off d, 'DOMNodeInserted', Main.addStyle
|
|
||||||
if d.head
|
|
||||||
$.addStyle Main.css
|
|
||||||
else
|
|
||||||
$.on d, 'DOMNodeInserted', Main.addStyle
|
|
||||||
css: """
|
css: """
|
||||||
/* general */
|
/* general */
|
||||||
.dialog.reply {
|
.dialog.reply {
|
||||||
@ -942,6 +936,9 @@ body.fourchan_x {
|
|||||||
.quotelink.deadlink {
|
.quotelink.deadlink {
|
||||||
text-decoration: underline !important;
|
text-decoration: underline !important;
|
||||||
}
|
}
|
||||||
|
.deadlink:not(.quotelink) {
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
.inlined {
|
.inlined {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
@ -1019,9 +1016,9 @@ Redirect =
|
|||||||
post: (board, postID) ->
|
post: (board, postID) ->
|
||||||
switch board
|
switch board
|
||||||
when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz'
|
when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz'
|
||||||
"//archive.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json"
|
"//archive.foolz.us/_/api/chan/post/?board=#{board}&num=#{postID}"
|
||||||
when 'u', 'kuku'
|
when 'u', 'kuku'
|
||||||
"//nsfw.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json"
|
"//nsfw.foolz.us/_/api/chan/post/?board=#{board}&num=#{postID}"
|
||||||
# for fuuka-based archives:
|
# for fuuka-based archives:
|
||||||
# https://github.com/eksopl/fuuka/issues/27
|
# https://github.com/eksopl/fuuka/issues/27
|
||||||
thread: (board, threadID, postID) ->
|
thread: (board, threadID, postID) ->
|
||||||
@ -1088,7 +1085,7 @@ Build =
|
|||||||
capcode: data.capcode
|
capcode: data.capcode
|
||||||
tripcode: data.trip
|
tripcode: data.trip
|
||||||
uniqueID: data.id
|
uniqueID: data.id
|
||||||
email: if data.email then encodeURIComponent data.email else ''
|
email: if data.email then encodeURIComponent data.email.replace /"/g, '"' else ''
|
||||||
subject: data.sub
|
subject: data.sub
|
||||||
flagCode: data.country
|
flagCode: data.country
|
||||||
flagName: data.country_name
|
flagName: data.country_name
|
||||||
@ -1161,7 +1158,7 @@ Build =
|
|||||||
when 'mod'
|
when 'mod'
|
||||||
capcodeClass = " capcodeMod"
|
capcodeClass = " capcodeMod"
|
||||||
capcodeStart = " <strong class='capcode hand id_mod' " +
|
capcodeStart = " <strong class='capcode hand id_mod' " +
|
||||||
"title='Highlight posts by Moderators'>## Moderator</strong>"
|
"title='Highlight posts by Moderators'>## Mod</strong>"
|
||||||
capcode = " <img src='#{staticPath}/image/modicon.gif' " +
|
capcode = " <img src='#{staticPath}/image/modicon.gif' " +
|
||||||
"alt='This user is a 4chan Moderator.' " +
|
"alt='This user is a 4chan Moderator.' " +
|
||||||
"title='This user is a 4chan Moderator.' class=identityIcon>"
|
"title='This user is a 4chan Moderator.' class=identityIcon>"
|
||||||
@ -1479,7 +1476,7 @@ Get =
|
|||||||
when 'D' then 'developer'
|
when 'D' then 'developer'
|
||||||
tripcode: data.trip
|
tripcode: data.trip
|
||||||
uniqueID: data.poster_hash
|
uniqueID: data.poster_hash
|
||||||
email: encodeURIComponent data.email
|
email: if data.email then encodeURIComponent data.email else ''
|
||||||
subject: data.title_processed
|
subject: data.title_processed
|
||||||
flagCode: data.poster_country
|
flagCode: data.poster_country
|
||||||
flagName: data.poster_country_name_processed
|
flagName: data.poster_country_name_processed
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user