Merge branch 'v3'

Conflicts:
	CHANGELOG.md
	LICENSE
	builds/appchan-x.user.js
	builds/crx/script.js
This commit is contained in:
Zixaphir 2014-04-19 16:55:27 -07:00
commit d74834d406
7 changed files with 16 additions and 15 deletions

View File

@ -1,3 +1,6 @@
**MayhemYDG**
- Bugfixes
### v2.9.16 ### v2.9.16
*2014-04-19* *2014-04-19*

View File

@ -138,7 +138,7 @@
Config = { Config = {
main: { main: {
'Miscellaneous': { 'Miscellaneous': {
'JSON Navigation': [false, 'Use JSON for loading the Board Index and Threads. Also allows searching and sorting the board index and infinite scolling.'], 'JSON Navigation': [true, 'Use JSON for loading the Board Index and Threads. Also allows searching and sorting the board index and infinite scolling.'],
'Catalog Links': [true, 'Add toggle link in header menu to turn Navigation links into links to each board\'s catalog.'], 'Catalog Links': [true, 'Add toggle link in header menu to turn Navigation links into links to each board\'s catalog.'],
'External Catalog': [false, 'Link to external catalog instead of the internal one.'], 'External Catalog': [false, 'Link to external catalog instead of the internal one.'],
'Desktop Notifications': [false, 'Enables desktop notifications across various appchan x features.'], 'Desktop Notifications': [false, 'Enables desktop notifications across various appchan x features.'],
@ -3399,7 +3399,7 @@
} }
this.file.sizeInBytes = size; this.file.sizeInBytes = size;
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg"; this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
this.file.name = (nameNode = $('span', fileText)) ? nameNode.title || nameNode.textContent : fileText.title; this.file.name = !this.file.isSpoiler && (nameNode = $('a', fileText)) ? nameNode.title || nameNode.textContent : fileText.title;
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.name); this.file.isImage = /(jpg|png|gif)$/i.test(this.file.name);
this.file.isVideo = /webm$/i.test(this.file.name); this.file.isVideo = /webm$/i.test(this.file.name);
if (this.file.isImage || this.file.isVideo) { if (this.file.isImage || this.file.isVideo) {
@ -5875,7 +5875,7 @@
a.textContent = filename; a.textContent = filename;
filename = a.innerHTML.replace(/'/g, '''); filename = a.innerHTML.replace(/'/g, ''');
fileDims = file.name.slice(-3) === 'pdf' ? 'PDF' : "" + file.width + "x" + file.height; fileDims = file.name.slice(-3) === 'pdf' ? 'PDF' : "" + file.width + "x" + file.height;
fileInfo = ("<div class=fileText" + (file.isSpoiler ? " title='" + filename + "'" : '') + ">File: <a href='" + file.url + "' target=_blank>" + file.timestamp + "</a>") + ("-(" + fileSize + ", " + fileDims + (file.isSpoiler ? '' : ", <span" + (filename !== shortFilename ? " title='" + filename + "'" : '') + ">" + shortFilename + "</span>")) + ")</div>"; fileInfo = ("<div class=fileText " + (file.isSpoiler ? "title='" + filename + "'" : '') + ">File: ") + ("<a href='" + file.url + "' " + (filename !== shortFilename && !file.isSpoiler ? " title='" + filename + "'" : '') + " target=_blank>" + (file.isSpoiler ? 'Spoiler Image' : shortFilename) + "</a>") + (" (" + fileSize + ", " + fileDims + ")</div>");
fileHTML = "<div class=file>" + fileInfo + imgSrc + "</div>"; fileHTML = "<div class=file>" + fileInfo + imgSrc + "</div>";
} else { } else {
fileHTML = ''; fileHTML = '';

View File

@ -113,7 +113,7 @@
Config = { Config = {
main: { main: {
'Miscellaneous': { 'Miscellaneous': {
'JSON Navigation': [false, 'Use JSON for loading the Board Index and Threads. Also allows searching and sorting the board index and infinite scolling.'], 'JSON Navigation': [true, 'Use JSON for loading the Board Index and Threads. Also allows searching and sorting the board index and infinite scolling.'],
'Catalog Links': [true, 'Add toggle link in header menu to turn Navigation links into links to each board\'s catalog.'], 'Catalog Links': [true, 'Add toggle link in header menu to turn Navigation links into links to each board\'s catalog.'],
'External Catalog': [false, 'Link to external catalog instead of the internal one.'], 'External Catalog': [false, 'Link to external catalog instead of the internal one.'],
'Desktop Notifications': [false, 'Enables desktop notifications across various appchan x features.'], 'Desktop Notifications': [false, 'Enables desktop notifications across various appchan x features.'],
@ -3454,7 +3454,7 @@
} }
this.file.sizeInBytes = size; this.file.sizeInBytes = size;
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg"; this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
this.file.name = (nameNode = $('span', fileText)) ? nameNode.title || nameNode.textContent : fileText.title; this.file.name = !this.file.isSpoiler && (nameNode = $('a', fileText)) ? nameNode.title || nameNode.textContent : fileText.title;
this.file.name = this.file.name.replace(/%22/g, '"'); this.file.name = this.file.name.replace(/%22/g, '"');
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.name); this.file.isImage = /(jpg|png|gif)$/i.test(this.file.name);
this.file.isVideo = /webm$/i.test(this.file.name); this.file.isVideo = /webm$/i.test(this.file.name);
@ -5933,7 +5933,7 @@
a.textContent = filename; a.textContent = filename;
filename = a.innerHTML.replace(/'/g, '&apos;'); filename = a.innerHTML.replace(/'/g, '&apos;');
fileDims = file.name.slice(-3) === 'pdf' ? 'PDF' : "" + file.width + "x" + file.height; fileDims = file.name.slice(-3) === 'pdf' ? 'PDF' : "" + file.width + "x" + file.height;
fileInfo = ("<div class=fileText" + (file.isSpoiler ? " title='" + filename + "'" : '') + ">File: <a href='" + file.url + "' target=_blank>" + file.timestamp + "</a>") + ("-(" + fileSize + ", " + fileDims + (file.isSpoiler ? '' : ", <span" + (filename !== shortFilename ? " title='" + filename + "'" : '') + ">" + shortFilename + "</span>")) + ")</div>"; fileInfo = ("<div class=fileText " + (file.isSpoiler ? "title='" + filename + "'" : '') + ">File: ") + ("<a href='" + file.url + "' " + (filename !== shortFilename && !file.isSpoiler ? " title='" + filename + "'" : '') + " target=_blank>" + (file.isSpoiler ? 'Spoiler Image' : shortFilename) + "</a>") + (" (" + fileSize + ", " + fileDims + ")</div>");
fileHTML = "<div class=file>" + fileInfo + imgSrc + "</div>"; fileHTML = "<div class=file>" + fileInfo + imgSrc + "</div>";
} else { } else {
fileHTML = ''; fileHTML = '';

View File

@ -105,6 +105,7 @@ a[href="javascript:;"] {
:root.bottom-header body { :root.bottom-header body {
margin-bottom: 2em; margin-bottom: 2em;
} }
body > .desktop,
:root.fourchan-x #navtopright, :root.fourchan-x #navtopright,
:root.fourchan-x #navbotright, :root.fourchan-x #navbotright,
:root.fourchan-x:not(.show-original-top-board-list) #boardNavDesktop, :root.fourchan-x:not(.show-original-top-board-list) #boardNavDesktop,
@ -1061,6 +1062,7 @@ a.remove {
/* Other */ /* Other */
.linkified { .linkified {
text-decoration: underline;
word-break: break-all; word-break: break-all;
} }
.posteruid.painted { .posteruid.painted {

View File

@ -160,13 +160,9 @@ Build =
filename = a.innerHTML.replace /'/g, '&apos;' filename = a.innerHTML.replace /'/g, '&apos;'
fileDims = if file.name[-3..] is 'pdf' then 'PDF' else "#{file.width}x#{file.height}" fileDims = if file.name[-3..] is 'pdf' then 'PDF' else "#{file.width}x#{file.height}"
fileInfo = "<div class=fileText#{if file.isSpoiler then " title='#{filename}'" else ''}>File: <a href='#{file.url}' target=_blank>#{file.timestamp}</a>" + fileInfo = "<div class=fileText #{if file.isSpoiler then "title='#{filename}'" else ''}>File: " +
"-(#{fileSize}, #{fileDims}#{ "<a href='#{file.url}' #{if filename isnt shortFilename and !file.isSpoiler then " title='#{filename}'" else ''} target=_blank>#{if file.isSpoiler then 'Spoiler Image' else shortFilename}</a>" +
if file.isSpoiler " (#{fileSize}, #{fileDims})</div>"
''
else
", <span#{if filename isnt shortFilename then " title='#{filename}'" else ''}>#{shortFilename}</span>"
}" + ")</div>"
fileHTML = "<div class=file>#{fileInfo}#{imgSrc}</div>" fileHTML = "<div class=file>#{fileInfo}#{imgSrc}</div>"
else else

View File

@ -2,7 +2,7 @@ Config =
main: main:
'Miscellaneous': 'Miscellaneous':
'JSON Navigation' : [ 'JSON Navigation' : [
false true
'Use JSON for loading the Board Index and Threads. Also allows searching and sorting the board index and infinite scolling.' 'Use JSON for loading the Board Index and Threads. Also allows searching and sorting the board index and infinite scolling.'
] ]
'Catalog Links': [ 'Catalog Links': [

View File

@ -135,7 +135,7 @@ class Post
thumb.src thumb.src
else else
"#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg" "#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg"
@file.name = if nameNode = $ 'span', fileText @file.name = if !@file.isSpoiler and nameNode = $ 'a', fileText
nameNode.title or nameNode.textContent nameNode.title or nameNode.textContent
else else
fileText.title fileText.title