Merge branch 'v3'

Conflicts:
	CHANGELOG.md
	LICENSE
	builds/4chan-X.meta.js
	builds/4chan-X.user.js
	builds/crx/manifest.json
	builds/crx/script.js
	latest.js
	package.json
	src/General/Config.coffee
This commit is contained in:
Zixaphir 2013-10-13 14:42:58 -07:00
commit 904316e4e0
63 changed files with 12440 additions and 1296 deletions

View File

@ -1,4 +1,3 @@
**MayhemYDG**:
- Tiny posting cooldown adjustment:
* You can post an image reply immediately after a non-image reply.
@ -9,10 +8,14 @@
* Timers vary across boards.
- Updated post and deletion cooldown timers to match 4chan changes: they are now twice longer.
- Added support for the flag selector on /pol/.
- Minor Chrome 30 fix.
**seaweedchan**:
- Fix thread updater bug introduced in last version
- Just some small fixes.
- Delete cooldown update
- Small bug fixes
- Don't show warnings AND desktop notifications at the same time, and prefer QR warnings unless the document is hidden
**zixaphir**:
- Some changes to mascots
@ -36,6 +39,7 @@
* The QR will now warn you when you are running low on cached captchas while auto-posting.
**seaweedchan**:
<<<<<<< HEAD
- Gallery Bugfix: hide thumbnails
**Zixaphir**:
@ -66,6 +70,12 @@
*2013-08-21*
**Zixaphir**:
=======
- Visual overhaul for gallery mode
**Zixaphir**:
- Fix an issue with the file dialog randomly opening multiple times (with seaweedchan)
>>>>>>> v3
![Gallery](src/General/img/changelog/2.3.6.png)
- **New Feature**: `Gallery`.
* Disabled by default.

View File

@ -90,11 +90,11 @@ module.exports = (grunt) ->
stderr: true
failOnError: true
commit:
command: [
'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."'
'git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
'git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
].join ' && '
command: """
git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."
git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."
git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.version %>."
"""
push:
command: 'git push origin --tags -f && git push origin --all'

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.3.10 - 2013-09-24
* appchan x - Version 2.3.10 - 2013-10-13
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

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

@ -0,0 +1,21 @@
// ==UserScript==
// @name 4chan X
// @version 1.2.41
// @minGMVer 1.13
// @minFFVer 22
// @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==

11855
builds/4chan-X.user.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@
"run_at": "document_start"
}],
"homepage_url": "http://zixaphir.github.com/appchan-x/",
"minimum_chrome_version": "29",
"minimum_chrome_version": "27",
"permissions": [
"storage"
]

File diff suppressed because one or more lines are too long

View File

@ -1,938 +0,0 @@
/* General */
.dialog {
box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
border: 1px solid;
display: block;
padding: 0;
}
.field {
background-color: #FFF;
border: 1px solid #CCC;
-moz-box-sizing: border-box;
box-sizing: border-box;
color: #333;
font-family: inherit;
font-size: 13px;
margin: 0;
padding: 2px 4px 3px;
outline: none;
transition: color .25s, border-color .25s, flex .25s;
}
.field::-moz-placeholder,
.field:hover::-moz-placeholder {
color: #AAA !important;
}
.field:hover {
border-color: #999;
}
.field:hover, .field:focus {
color: #000;
}
.field[disabled] {
background-color: #F2F2F2;
color: #888;
}
.move {
cursor: move;
}
label, .watcher-toggler {
cursor: pointer;
}
a[href="javascript:;"] {
text-decoration: none;
}
.warning {
color: red;
}
/* 4chan style fixes */
.opContainer, .op {
display: block !important;
}
.post {
overflow: visible !important;
}
[hidden] {
display: none !important;
}
/* fixed, z-index */
#overlay,
#qp, #ihover,
#updater, #thread-stats,
#navlinks, #header,
#qr {
position: fixed;
}
#overlay {
z-index: 999;
}
#notifications {
z-index: 70;
}
#qp, #ihover {
z-index: 60;
}
#menu {
z-index: 50;
}
#navlinks, #updater, #thread-stats {
z-index: 40;
}
#qr {
z-index: 30;
}
#thread-watcher:hover {
z-index: 20;
}
#header {
z-index: 10;
}
#thread-watcher {
z-index: 5;
}
/* Header */
:root.top-header body {
margin-top: 2em;
}
:root.bottom-header body {
margin-bottom: 2em;
}
:root.fourchan-x #navtopright,
:root.fourchan-x #navbotright,
:root.fourchan-x:not(.show-original-top-board-list) #boardNavDesktop,
:root.fourchan-x:not(.show-original-bot-board-list) #boardNavDesktopFoot {
display: none !important;
}
#header {
right: 0;
left: 0;
}
#header.top {
top: 0;
}
#header.bottom {
bottom: 0;
}
#header-bar {
border-width: 0;
display: flex;
padding: 3px;
position: relative;
transition: all .1s .05s ease-in-out;
}
#header.top #header-bar {
border-bottom-width: 1px;
}
#header.bottom #header-bar {
box-shadow: 0 -1px 2px rgba(0, 0, 0, .15);
border-top-width: 1px;
}
#board-list {
flex: 1;
align-self: center;
text-align: center;
}
#header-bar.autohide:not(:hover) {
box-shadow: none;
transition: all .8s .6s cubic-bezier(.55, .055, .675, .19);
}
#header.top #header-bar.autohide:not(:hover) {
margin-bottom: -1em;
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
}
#header.bottom #header-bar.autohide:not(:hover) {
-webkit-transform: translateY(100%);
transform: translateY(100%);
}
#toggle-header-bar {
left: 0;
right: 0;
height: 10px;
position: absolute;
}
#header.top #toggle-header-bar {
cursor: n-resize;
bottom: -10px;
}
#header.bottom #toggle-header-bar {
cursor: s-resize;
top: -10px;
}
#header.top #header-bar.autohide #toggle-header-bar {
cursor: s-resize;
}
#header.bottom #header-bar.autohide #toggle-header-bar {
cursor: n-resize;
}
#header-bar a:not(.entry) {
text-decoration: none;
padding: 1px;
}
.shortcut:not(:last-child)::after {
content: " / ";
}
.brackets-wrap::before {
content: " [ ";
}
.brackets-wrap::after {
content: " ] ";
}
/* Notifications */
#notifications {
height: 0;
text-align: center;
}
#header.bottom #notifications {
position: fixed;
top: 0;
left: 0;
width: 100%;
}
.notification {
color: #FFF;
font-weight: 700;
text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
border-radius: 2px;
margin: 1px auto;
width: 500px;
max-width: 100%;
position: relative;
transition: all .25s ease-in-out;
}
.notification.error {
background-color: hsla(0, 100%, 38%, .9);
}
.notification.warning {
background-color: hsla(36, 100%, 38%, .9);
}
.notification.info {
background-color: hsla(200, 100%, 38%, .9);
}
.notification.success {
background-color: hsla(104, 100%, 38%, .9);
}
.notification a {
color: white;
}
.notification > .close {
padding: 6px;
top: 0;
right: 0;
position: absolute;
}
.message {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 6px 20px;
max-height: 200px;
width: 100%;
overflow: auto;
}
/* Settings */
:root.fourchan-x body {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#overlay {
background-color: rgba(0, 0, 0, .5);
display: flex;
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
#fourchanx-settings {
-moz-box-sizing: border-box;
box-sizing: border-box;
box-shadow: 0 0 15px rgba(0, 0, 0, .15);
height: 600px;
max-height: 100%;
width: 900px;
max-width: 100%;
margin: auto;
padding: 3px;
display: flex;
flex-direction: column;
}
#fourchanx-settings > nav {
display: flex;
padding: 2px 2px 0;
}
#fourchanx-settings > nav a {
text-decoration: underline;
}
#fourchanx-settings > nav a.close {
text-decoration: none;
padding: 2px;
}
.sections-list {
flex: 1;
}
.tab-selected {
font-weight: 700;
}
.section-container {
flex: 1;
position: relative;
}
.section-container > section {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
}
.section-sauce ul,
.section-rice ul {
list-style: none;
margin: 0;
padding: 8px;
}
.section-sauce li,
.section-rice li {
padding-left: 4px;
}
.section-main label {
text-decoration: underline;
}
.section-filter ul,
.section-qr ul {
padding: 0;
}
.section-filter li,
.section-qr li {
margin: 10px 40px;
}
.section-filter textarea {
height: 500px;
}
.section-qr textarea {
height: 200px;
}
.section-sauce textarea {
height: 350px;
}
.section-rice .field[name="boardnav"] {
width: 100%;
}
.section-rice textarea {
height: 150px;
}
.section-archives table {
width: 100%;
}
.section-archives th:not(:first-child) {
width: 30%;
}
.section-archives td {
text-align: center;
}
.section-archives select {
width: 90%;
}
.section-keybinds .field {
font-family: monospace;
}
#fourchanx-settings fieldset {
border: 1px solid;
border-radius: 3px;
}
#fourchanx-settings legend {
font-weight: 700;
}
#fourchanx-settings textarea {
font-family: monospace;
min-width: 100%;
max-width: 100%;
}
#fourchanx-settings code {
color: #000;
background-color: #FFF;
padding: 0 2px;
}
.unscroll {
overflow: hidden;
}
/* Announcement Hiding */
:root.hide-announcement #globalMessage,
:root.hide-announcement-enabled #toggleMsgBtn {
display: none;
}
a.hide-announcement {
float: left;
}
/* Unread */
#unread-line {
margin: 0;
}
/* Thread Updater */
#updater:not(:hover) {
background: none;
border: none;
box-shadow: none;
}
#updater > .move {
padding: 0 3px;
}
#updater > div:last-child {
text-align: center;
}
#updater input[type=number] {
width: 4em;
}
#updater:not(:hover) > div:not(.move) {
display: none;
}
#updater input[type="button"] {
width: 100%;
}
.new {
color: limegreen;
}
/* Thread Watcher */
#thread-watcher {
max-width: 200px;
min-width: 150px;
padding: 3px;
position: absolute;
}
#thread-watcher > div:first-child {
display: flex;
align-items: center;
}
#thread-watcher .move {
flex: 1;
}
#watcher-status:not(:empty)::before {
content: "(";
}
#watcher-status:not(:empty)::after {
content: ")";
}
#watched-threads:not(:hover) {
max-height: 150px;
overflow: hidden;
}
#watched-threads div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#watched-threads .current {
font-weight: 700;
}
#watched-threads a {
text-decoration: none;
}
#watched-threads .dead-thread a[title] {
text-decoration: line-through;
}
/* Thread Stats */
#thread-stats {
background: none;
border: none;
box-shadow: none;
}
/* Quote */
.deadlink {
text-decoration: none !important;
}
.backlink.deadlink:not(.forwardlink),
.quotelink.deadlink:not(.forwardlink) {
text-decoration: underline !important;
}
.inlined {
opacity: .5;
}
#qp input, .forwarded {
display: none;
}
.quotelink.forwardlink,
.backlink.forwardlink {
text-decoration: none;
border-bottom: 1px dashed;
}
.filtered {
text-decoration: underline line-through;
}
.inline {
border: 1px solid;
display: table;
margin: 2px 0;
}
.inline .post {
border: 0 !important;
background-color: transparent !important;
display: table !important;
margin: 0 !important;
padding: 1px 2px !important;
}
#qp > .opContainer::after {
content: '';
clear: both;
display: table;
}
#qp .post {
border: none;
margin: 0;
padding: 2px 2px 5px;
}
#qp img {
max-height: 80vh;
max-width: 50vw;
}
.qphl {
outline: 2px solid rgba(216, 94, 49, .7);
}
/* File */
.fileText:hover .fntrunc,
.fileText:not(:hover) .fnfull,
.expanded-image > .post > .file > .fileThumb > img[data-md5],
:not(.expanded-image) > .post > .file > .fileThumb > .full-image {
display: none;
}
.expanding {
opacity: .5;
}
.expanded-image {
clear: both;
}
.expanded-image > .op > .file::after {
content: '';
clear: both;
display: table;
}
:root.fit-height .full-image {
max-height: 100vh;
}
:root.fit-width .full-image {
max-width: 100%;
}
:root.gecko.fit-width .full-image {
width: 100%;
}
#ihover {
-moz-box-sizing: border-box;
box-sizing: border-box;
max-height: 100%;
max-width: 75%;
padding-bottom: 16px;
}
/* Index/Reply Navigation */
#navlinks {
font-size: 16px;
top: 25px;
right: 10px;
}
/* Filter */
.opContainer.filter-highlight {
box-shadow: inset 5px 0 rgba(255, 0, 0, .5);
}
.filter-highlight > .reply {
box-shadow: -5px 0 rgba(255, 0, 0, .5);
}
/* Thread & Reply Hiding */
.hide-thread-button,
.hide-reply-button {
float: left;
margin-right: 2px;
}
.stub ~ * {
display: none !important;
}
.stub input {
display: inline-block;
}
/* QR */
:root.hide-original-post-form #postForm,
:root.hide-original-post-form .postingMode,
:root.hide-original-post-form #togglePostForm,
#qr.autohide:not(.has-focus):not(:hover) > form {
display: none;
}
#qr select, #dump-button, .remove, .captcha-img {
cursor: pointer;
}
#qr > div {
min-width: 300px;
display: flex;
align-items: center;
}
#qr .move {
align-self: stretch;
flex: 1;
}
#qr select[data-name=thread] {
margin: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
background: none;
font: inherit;
}
#qr option {
color: #000;
background-color: #F7F7F7;
}
#qr .close {
padding: 0 3px;
}
#qr > form {
display: flex;
flex-direction: column;
}
.persona {
display: flex;
}
.persona .field {
flex: 1;
}
.persona .field:hover,
.persona .field:focus {
flex: 3;
}
#dump-button {
background: linear-gradient(#EEE, #CCC);
border: 1px solid #CCC;
margin: 0;
padding: 2px 4px 3px;
outline: none;
width: 30px;
}
#dump-button:hover,
#dump-button:focus {
background: linear-gradient(#FFF, #DDD);
}
#dump-button:active,
.dump #dump-button:not(:hover):not(:focus) {
background: linear-gradient(#CCC, #DDD);
}
:root.gecko #dump-button {
padding: 0;
}
#qr:not(.dump) #dump-list-container {
display: none;
}
#dump-list-container {
height: 100px;
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
#dump-list {
counter-reset: qrpreviews;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
white-space: nowrap;
}
#dump-list:hover {
bottom: -12px;
overflow-x: auto;
z-index: 1;
}
#dump-list::-webkit-scrollbar {
height: 12px;
}
#dump-list::-webkit-scrollbar-thumb {
border: 1px solid;
}
.qr-preview {
background-position: 50% 20%;
background-size: cover;
border: 1px solid #808080;
color: #FFF !important;
font-size: 12px;
-moz-box-sizing: border-box;
box-sizing: border-box;
cursor: move;
display: inline-block;
height: 92px;
width: 92px;
margin: 4px;
padding: 2px;
opacity: .6;
outline: none;
overflow: hidden;
position: relative;
text-shadow: 0 1px 1px #000;
transition: opacity .25s ease-in-out;
vertical-align: top;
white-space: pre;
}
.qr-preview:hover,
.qr-preview:focus {
opacity: .9;
color: #FFF !important;
}
.qr-preview#selected {
opacity: 1;
}
.qr-preview::before {
counter-increment: qrpreviews;
content: counter(qrpreviews);
font-weight: 700;
text-shadow: 0 0 3px #000, 0 0 5px #000;
position: absolute;
top: 3px;
right: 3px;
}
.qr-preview.drag {
border-color: red;
border-style: dashed;
opacity: 1;
}
.qr-preview.over {
border-color: #FFF;
border-style: dashed;
opacity: 1;
}
.remove {
color: #E00 !important;
font-weight: 700;
padding: 3px;
}
.remove:hover::after {
content: ' Remove';
}
.qr-preview > label {
background: rgba(0, 0, 0, .5);
right: 0;
bottom: 0;
left: 0;
position: absolute;
text-align: center;
}
.qr-preview > label > input {
margin: 1px 0;
vertical-align: bottom;
}
#add-post {
display: inline-block;
font-size: 30px;
height: 30px;
width: 30px;
line-height: 1;
text-align: center;
position: absolute;
right: 0;
bottom: 0;
z-index: 1;
}
#qr textarea {
min-height: 160px;
min-width: 100%;
display: block;
}
#qr.has-captcha textarea {
min-height: 120px;
}
.textarea {
position: relative;
}
#char-count {
color: #000;
background: hsla(0, 0%, 100%, .5);
font-size: 8pt;
position: absolute;
bottom: 1px;
right: 1px;
pointer-events: none;
}
#char-count.warning {
color: red;
}
.captcha-img {
background: #FFF;
outline: 1px solid #CCC;
outline-offset: -1px;
}
.captcha-img > img {
display: block;
height: 57px;
width: 300px;
}
#file-n-submit-container {
position: relative;
}
#file-n-submit {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
align-items: center;
}
#file-n-submit-container input[type='file'] {
/* Keep it to set an appropriate height to the container. */
visibility: hidden;
}
#file-n-submit-container input {
margin: 0;
}
#file-n-submit input[type='submit'] {
order: 1;
}
#file-n-submit.has-file #qr-no-file,
#file-n-submit:not(.has-file) #qr-filename,
#file-n-submit:not(.has-file) #qr-filesize,
#file-n-submit:not(.has-file) #qr-file-spoiler,
#file-n-submit:not(.has-file) #qr-filerm,
#qr-filename:focus ~ #qr-filesize {
display: none;
}
#qr-no-file,
#qr-filename,
#qr-filesize,
#qr-filerm,
#qr-file-spoiler {
margin: 0 2px !important;
}
#qr-no-file {
cursor: default;
flex: 1;
}
#qr-filename {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: none;
border: none !important;
color: inherit;
font: inherit;
flex: 1;
text-overflow: ellipsis;
}
#qr-filesize {
font-size: .8em;
}
#qr-filesize::before {
content: " (";
}
#qr-filesize::after {
content: ")";
}
/* Menu */
.menu-button {
position: relative;
}
.menu-button i:not(.icon-reorder) {
border-top: 6px solid;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
display: inline-block;
margin: 2px;
vertical-align: middle;
}
@media screen and (resolution: 1dppx) {
.icon-reorder {
font-size: 14px;
}
#shortcuts .icon-reorder {
vertical-align: -1px;
}
}
#menu {
border-bottom: 0;
display: flex;
margin: 2px 0;
flex-direction: column;
position: absolute;
outline: none;
}
#menu.top {
top: 100%;
}
#menu.bottom {
bottom: 100%;
}
#menu.left {
left: 0;
}
#menu.right {
right: 0;
}
.entry {
cursor: pointer;
outline: none;
padding: 3px 7px;
position: relative;
text-decoration: none;
white-space: nowrap;
}
.entry.disabled {
color: graytext !important;
}
.entry.has-submenu {
padding-right: 20px;
}
.has-submenu::after {
content: '';
border-left: 6px solid;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
display: inline-block;
margin: 4px;
position: absolute;
right: 3px;
}
.has-submenu:not(.focused) > .submenu {
display: none;
}
.submenu {
border-bottom: 0;
display: flex;
flex-direction: column;
position: absolute;
margin: -1px 0;
}
.submenu.top {
top: 0;
}
.submenu.bottom {
bottom: 0;
}
.submenu.left {
left: 100%;
}
.submenu.right {
right: 100%;
}
.entry input {
margin: 0;
}
/* colored uid */
.posteruid.painted {
padding: 0 5px;
border-radius: 1em;
font-size: 0.8em;
cursor: pointer;
}

BIN
img/changelog/3.9.0/0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -43,15 +43,6 @@
"software": "foolfuuka",
"boards": ["c", "w", "wg"],
"files": ["c", "w", "wg"]
}, {
"uid": 11,
"name": "Foolz a Shit",
"domain": "archive.foolzashit.com",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["adv", "asp", "cm", "d", "e", "i", "lgbt", "n", "o", "p", "pol", "s", "s4s", "t", "trv", "y"],
"files": ["cm", "d", "e", "i", "n", "o", "p", "s", "trv", "y"]
}, {
"uid": 12,
"name": "FapArchive",
@ -59,8 +50,8 @@
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["b", "e", "h", "hc", "p", "s", "soc", "sp", "u"],
"files": ["b", "e", "h", "hc", "p", "s", "soc", "sp", "u"]
"boards": ["b", "con", "e", "h", "hc", "p", "s", "soc", "sp", "u"],
"files": ["b", "con", "e", "h", "hc", "p", "s", "soc", "sp", "u"]
}, {
"uid": 7,
"name": "Install Gentoo",
@ -77,8 +68,8 @@
"http": true,
"https": true,
"software": "fuuka",
"boards": ["cgl", "g", "mu", "w"],
"files": ["cgl", "g", "mu", "w"]
"boards": ["cgl", "con", "g", "mu", "w"],
"files": ["cgl", "con", "g", "mu", "w"]
}, {
"uid": 9,
"name": "Heinessen",

View File

@ -22,7 +22,7 @@
"font-awesome": "git://github.com/MayhemYDG/Font-Awesome.git#df4285951124f9ca1f3907438462e5ba9e464bcb",
"grunt": "~0.4.1",
"grunt-bump": "~0.0.11",
"grunt-concurrent": "~0.3.1",
"grunt-concurrent": "~0.4.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-compress": "~0.5.2",

View File

@ -35,7 +35,7 @@ Redirect =
http: true
https: true
software: 'foolfuuka'
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u']
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'soc', 'sp', 'u']
files: ['b', 'e', 'h', 'hc', 'p', 's', 'soc', 'sp', 'u']
'Foolz':
@ -46,14 +46,6 @@ Redirect =
boards: ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg']
files: ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
'Foolz a Shit':
domain: 'archive.foolzashit.com'
http: true
https: true
software: 'foolfuuka'
boards: ['adv', 'asp', 'cm', 'd', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y']
files: ['cm', 'd', 'e', 'i', 'n', 'o', 'p', 's', 'trv', 'y']
'Foolz Beta':
domain: 'beta.foolz.us'
http: true

View File

@ -2,7 +2,7 @@ Anonymize =
init: ->
return if g.VIEW is 'catalog' or !Conf['Anonymize']
Post::callbacks.push
Post.callbacks.push
name: 'Anonymize'
cb: @node
node: ->

View File

@ -67,7 +67,7 @@ Filter =
delete @filters[key]
return unless Object.keys(@filters).length
Post::callbacks.push
Post.callbacks.push
name: 'Filter'
cb: @node

View File

@ -6,7 +6,7 @@ PostHiding =
$.addClass doc, "reply-hide"
@db = new DataBoard 'hiddenPosts'
Post::callbacks.push
Post.callbacks.push
name: 'Reply Hiding'
cb: @node

View File

@ -3,7 +3,7 @@ Recursive =
init: ->
return if g.VIEW is 'catalog'
Post::callbacks.push
Post.callbacks.push
name: 'Recursive'
cb: @node
@ -35,4 +35,4 @@ Recursive =
for ID, post of g.posts
if post.quotes.contains fullID
recursive post, args...
return
return

View File

@ -4,7 +4,7 @@ ThreadHiding =
@db = new DataBoard 'hiddenThreads'
@syncCatalog()
Thread::callbacks.push
Thread.callbacks.push
name: 'Thread Hiding'
cb: @node

View File

@ -72,7 +72,7 @@ Build =
emailStart = ''
emailEnd = ''
subject = "<span class=subject>#{subject or ''}</span>"
subject = " <span class=subject>#{subject or ''}</span> "
userID =
if !capcode and uniqueID

View File

@ -799,8 +799,10 @@ Config =
#/Mod$/;highlight:mod;op:yes
# Set a custom class for moot:
#/Admin$/;highlight:moot;op:yes
"""
"""
email: ""
subject: """
# Filter Generals on /v/:
#/general/i;boards:v;op:only
@ -853,7 +855,7 @@ http://iqdb.org/?url=%TURL
[ toggle-all ]
[current-title]
[external-text:"FAQ","https://github.com/seaweedchan/4chan-x/wiki/Frequently-Asked-Questions"]
"""
"""
QR:
'QR.personas': """#email:"sage";boards:jp;always"""

View File

@ -234,7 +234,7 @@ Main =
callbackNodes: (klass, nodes) ->
# get the nodes' length only once
len = nodes.length
for callback in klass::callbacks
for callback in klass.callbacks
# c.profile callback.name
i = 0
while i < len
@ -269,7 +269,7 @@ Main =
errors = null
func = (node, i) ->
for callback in klass::callbacks
for callback in klass.callbacks
try
callback.cb.call node
catch err
@ -301,7 +301,7 @@ Main =
else
return
obj.callback.isAddon = true
Klass::callbacks.push obj.callback
Klass.callbacks.push obj.callback
handleErrors: (errors) ->
unless errors instanceof Array

View File

@ -675,7 +675,7 @@ a.hide-announcement {
:root.hide-original-post-form .postingMode,
:root.hide-original-post-form #togglePostForm,
#qr.autohide:not(.has-focus):not(:hover) > form,
.postingMode ~ #qr select,
.postingMode ~ #qr select[data-name=thread],
#file-n-submit:not(.has-file) #qr-filerm {
display: none;
}
@ -837,7 +837,7 @@ input#qr-filename:not(.edit) {
position: absolute;
}
/* Thread Select / Spoiler Label */
#qr select {
#qr select[data-name=thread] {
float: right;
}
#qr.has-spoiler .has-file #qr-spoiler-label {

View File

@ -34,7 +34,7 @@
<div class='postInfo desktop' id=pi#{postID}>
<input type=checkbox name=#{postID} value=delete>
&nbsp;#{subject}&nbsp;
#{subject}
<span class='nameBlock#{capcodeClass}'>
#{emailStart}
<span class=name>#{name or ''}</span>
@ -56,4 +56,4 @@
<blockquote class=postMessage id=m#{postID}>#{comment or ''}</blockquote>#{" "}
</div>"""
</div>"""

View File

@ -17,7 +17,7 @@
<legend>Custom Board Navigation</legend>
<div><textarea name=boardnav class=field spellcheck=false></textarea></div>
<span class=note>New lines will be converted into spaces.</span><br><br>
<div class=note>In the following examples for /g/, <code>g</code> can be changed to a different board ID (<code>a</code>, <code>b</code>, etc...), the current board (<code>current</code>), or the Status/Twitter link (<code>status</code>, <code>@</code>).</div>
<div class=note>In the following examples for /g/, <code>g</code> can be changed to a different board ID (<code>a</code>, <code>b</code>, etc...), the current board (<code>current</code>), or the Twitter link (<code>@</code>).</div>
<div>Board link: <code>g</code></div>
<div>Title link: <code>g-title</code></div>
<div>Board link (Replace with title when on that board): <code>g-replace</code></div>

View File

@ -1,5 +1,5 @@
class Post
callbacks: []
@callbacks = []
toString: -> @ID
constructor: (root, @thread, @board, that={}) ->

View File

@ -1,5 +1,5 @@
class Thread
callbacks: []
@callbacks = []
toString: -> @ID
constructor: (@ID, @board) ->

View File

@ -15,7 +15,7 @@
"run_at": "document_start"
}],
"homepage_url": "<%= meta.page %>",
"minimum_chrome_version": "29",
"minimum_chrome_version": "27",
"permissions": [
"storage"
]

20
src/Images/AutoGIF.coffee Normal file
View File

@ -0,0 +1,20 @@
AutoGIF =
init: ->
return if g.VIEW is 'catalog' or !Conf['Auto-GIF'] or g.BOARD.ID in ['gif', 'wsg']
Post.callbacks.push
name: 'Auto-GIF'
cb: @node
node: ->
return if @isClone or @isHidden or @thread.isHidden or !@file?.isImage
{thumb, URL} = @file
return unless /gif$/.test(URL) and !/spoiler/.test thumb.src
if @file.isSpoiler
# Revealed spoilers do not have height/width set, this fixes auto-gifs dimensions.
{style} = thumb
style.maxHeight = style.maxWidth = if @isReply then '125px' else '250px'
gif = $.el 'img'
$.on gif, 'load', ->
# Replace the thumbnail once the GIF has finished loading.
thumb.src = URL
gif.src = URL

View File

@ -25,7 +25,7 @@ FappeTyme =
Header.addShortcut el, true
Post::callbacks.push
Post.callbacks.push
name: 'Fappe Tyme'
cb: @node

View File

@ -13,7 +13,7 @@ Gallery =
Header.addShortcut el, true
Post::callbacks.push
Post.callbacks.push
name: 'Gallery'
cb: @node

View File

@ -12,7 +12,7 @@ ImageExpand =
Header.addShortcut @EAI, true
Post::callbacks.push
Post.callbacks.push
name: 'Image Expansion'
cb: @node

View File

@ -2,7 +2,7 @@ ImageHover =
init: ->
return if g.VIEW is 'catalog' or !Conf['Image Hover']
Post::callbacks.push
Post.callbacks.push
name: 'Image Hover'
cb: @node
node: ->

View File

@ -3,7 +3,7 @@ ImageLoader =
return if g.VIEW is 'catalog'
return unless Conf["Image Prefetching"] or Conf["Replace JPG"] or Conf["Replace PNG"] or Conf["Replace GIF"]
Post::callbacks.push
Post.callbacks.push
name: 'Image Replace'
cb: @node

View File

@ -2,11 +2,11 @@ RevealSpoilers =
init: ->
return if g.VIEW is 'catalog' or !Conf['Reveal Spoiler Thumbnails']
Post::callbacks.push
name: 'Reveal Spoiler Thumbnails'
Post.callbacks.push
cb: @node
node: ->
return if @isClone or !@file?.isSpoiler
{thumb} = @file
thumb.removeAttribute 'style'
thumb.src = @file.thumbURL
thumb.src = @file.thumbURL

View File

@ -11,7 +11,7 @@ Sauce =
return unless links.length
@links = links
@link = $.el 'a', target: '_blank'
Post::callbacks.push
Post.callbacks.push
name: 'Sauce'
cb: @node
createSauceLink: (link) ->

View File

@ -26,7 +26,7 @@ Linkify =
if Conf['Title Link']
$.sync 'CachedTitles', Linkify.titleSync
Post::callbacks.push
Post.callbacks.push
name: 'Linkify'
cb: @node

View File

@ -3,7 +3,7 @@ Menu =
return if g.VIEW is 'catalog' or !Conf['Menu']
@menu = new UI.Menu 'post'
Post::callbacks.push
Post.callbacks.push
name: 'Menu'
cb: @node

View File

@ -3,7 +3,7 @@ IDColor =
return if g.VIEW is 'catalog' or not Conf['Color User IDs']
@ids = {}
Post::callbacks.push
Post.callbacks.push
name: 'Color User IDs'
cb: @node

View File

@ -1,7 +1,7 @@
Dice =
init: ->
return if g.BOARD.ID isnt 'tg' or g.VIEW is 'catalog' or !Conf['Show Dice Roll']
Post::callbacks.push
Post.callbacks.push
name: 'Show Dice Roll'
cb: @node
node: ->

View File

@ -2,12 +2,10 @@ ExpandComment =
init: ->
return if g.VIEW isnt 'index' or !Conf['Comment Expansion']
if g.BOARD.ID is 'g'
@callbacks.push Fourchan.code
if g.BOARD.ID is 'sci'
@callbacks.push Fourchan.math
@callbacks.push Fourchan.code if g.BOARD.ID is 'g'
@callbacks.push Fourchan.math if g.BOARD.ID is 'sci'
Post::callbacks.push
Post.callbacks.push
name: 'Comment Expansion'
cb: @node

View File

@ -2,7 +2,7 @@ ExpandThread =
init: ->
return if g.VIEW isnt 'index' or !Conf['Thread Expansion']
Thread::callbacks.push
Thread.callbacks.push
name: 'Thread Expansion'
cb: @node

View File

@ -3,7 +3,7 @@ FileInfo =
return if g.VIEW is 'catalog' or !Conf['File Info Formatting']
@funk = @createFunc Conf['fileInfo']
Post::callbacks.push
Post.callbacks.push
name: 'File Info Formatting'
cb: @node
node: ->
@ -48,4 +48,4 @@ FileInfo =
B: -> FileInfo.convertUnit @file.sizeInBytes, 'B'
K: -> FileInfo.convertUnit @file.sizeInBytes, 'KB'
M: -> FileInfo.convertUnit @file.sizeInBytes, 'MB'
r: -> if @file.isImage then @file.dimensions else 'PDF'
r: -> if @file.isImage then @file.dimensions else 'PDF'

View File

@ -10,7 +10,7 @@ Fourchan =
pre.innerHTML = prettyPrintOne(pre.innerHTML);
}, false);
"""
Post::callbacks.push
Post.callbacks.push
name: 'Parse /g/ code'
cb: @code
if board is 'sci'
@ -27,7 +27,7 @@ Fourchan =
}
}, false);
"""
Post::callbacks.push
Post.callbacks.push
name: 'Parse /sci/ math'
cb: @math
code: ->

View File

@ -0,0 +1,40 @@
IDColor =
init: ->
return if g.VIEW is 'catalog' or !Conf['Color User IDs']
@ids = {}
Post.callbacks.push
name: 'Color User IDs'
cb: @node
node: ->
return if @isClone or !(uid = @info.uniqueID)
rgb = IDColor.compute uid
span = @nodes.uniqueID
{style} = span
style.color = rgb[3]
style.backgroundColor = "rgb(#{rgb[0]},#{rgb[1]},#{rgb[2]})"
$.addClass span, 'painted'
span.textContent = uid
span.title = 'Highlight posts by this ID'
compute: (uniqueID) ->
if uniqueID of IDColor.ids
return IDColor.ids[uniqueID]
hash = @hash uniqueID
rgb = [
(hash >> 24) & 0xFF
(hash >> 16) & 0xFF
(hash >> 8) & 0xFF
]
rgb.push if (rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) > 170
'black'
else
'white'
@ids[uniqueID] = rgb
hash: (uniqueID) ->
msg = 0
for i in [0...uniqueID.length] by 1
msg = (msg << 5) - msg + uniqueID.charCodeAt i
msg

View File

@ -9,7 +9,7 @@ RelativeDates =
# Start the timeout.
@flush()
Post::callbacks.push
Post.callbacks.push
name: 'Relative Post Dates'
cb: @node
node: ->
@ -104,4 +104,4 @@ RelativeDates =
markStale = -> RelativeDates.stale.push update
# Kick off initial timeout.
update new Date()
update new Date()

View File

@ -9,7 +9,7 @@ RemoveSpoilers =
@wrapper = (text) ->
"[spoiler]#{text}[/spoiler]"
Post::callbacks.push
Post.callbacks.push
name: 'Reveal Spoilers'
cb: @node

View File

@ -3,7 +3,7 @@ Time =
return if g.VIEW is 'catalog' or !Conf['Time Formatting']
@funk = @createFunc Conf['time']
Post::callbacks.push
Post.callbacks.push
name: 'Time Formatting'
cb: @node
node: ->

View File

@ -2,8 +2,8 @@ ThreadExcerpt =
init: ->
return if g.VIEW isnt 'thread' or !Conf['Thread Excerpt']
Thread::callbacks.push
Thread.callbacks.push
name: 'Thread Excerpt'
cb: @node
node: ->
d.title = Get.threadExcerpt @
d.title = Get.threadExcerpt @

View File

@ -19,7 +19,7 @@ ThreadStats =
@fileCountEl = $ '#file-count', sc
@pageCountEl = $ '#page-count', sc
Thread::callbacks.push
Thread.callbacks.push
name: 'Thread Stats'
cb: @node

View File

@ -54,7 +54,7 @@ ThreadUpdater =
order: 110
subEntries: subEntries
Thread::callbacks.push
Thread.callbacks.push
name: 'Thread Updater'
cb: @node
@ -62,6 +62,7 @@ ThreadUpdater =
ThreadUpdater.thread = @
ThreadUpdater.root = @OP.nodes.root.parentNode
ThreadUpdater.lastPost = +ThreadUpdater.root.lastElementChild.id.match(/\d+/)[0]
ThreadUpdater.outdateCount = 0
ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval']
@ -80,14 +81,14 @@ ThreadUpdater =
cb:
online: ->
if navigator.onLine
if ThreadUpdater.online = navigator.onLine
ThreadUpdater.outdateCount = 0
ThreadUpdater.setInterval()
ThreadUpdater.set 'status', null, null
else
ThreadUpdater.set 'timer', null
ThreadUpdater.set 'status', 'Offline', 'warning'
ThreadUpdater.count true
ThreadUpdater.cb.autoUpdate()
post: (e) ->
return unless ThreadUpdater.isUpdating and e.detail.threadID is ThreadUpdater.thread.ID
ThreadUpdater.outdateCount = 0
@ -108,7 +109,8 @@ ThreadUpdater =
return if d.hidden
# Reset the counter when we focus this tab.
ThreadUpdater.outdateCount = 0
ThreadUpdater.seconds = Math.min ThreadUpdater.seconds, ThreadUpdater.interval
if ThreadUpdater.seconds > ThreadUpdater.interval
ThreadUpdater.set 'timer', ThreadUpdater.getInterval()
scrollBG: ->
ThreadUpdater.scrollBG = if Conf['Scroll BG']
-> true
@ -121,29 +123,23 @@ ThreadUpdater =
$.cb.value.call @
load: (e) ->
{req} = ThreadUpdater
delete ThreadUpdater.req
if e.type isnt 'loadend' # timeout or abort
req.onloadend = null
if e.type is 'timeout'
ThreadUpdater.set 'status', 'Retrying', null
ThreadUpdater.update()
return
switch req.status
when 200
g.DEAD = false
ThreadUpdater.parse JSON.parse(req.response).posts
ThreadUpdater.setInterval()
ThreadUpdater.set 'timer', ThreadUpdater.getInterval()
when 404
g.DEAD = true
ThreadUpdater.set 'timer', null
ThreadUpdater.set 'status', '404', 'warning'
clearTimeout ThreadUpdater.timeoutID
ThreadUpdater.thread.kill()
$.event 'ThreadUpdate',
404: true
thread: ThreadUpdater.thread
else
ThreadUpdater.outdateCount++
ThreadUpdater.setInterval()
ThreadUpdater.set 'timer', ThreadUpdater.getInterval()
[text, klass] = if req.status is 304
[null, null]
else
@ -183,15 +179,15 @@ ThreadUpdater =
el.textContent = text
el.className = klass if klass isnt undefined
count: (start) ->
clearTimeout ThreadUpdater.timeoutID
ThreadUpdater.timeout() if start and ThreadUpdater.isUpdating and navigator.onLine
timeout: ->
ThreadUpdater.timeoutID = setTimeout ThreadUpdater.timeout, 1000
sec = ThreadUpdater.seconds--
ThreadUpdater.set 'timer', sec
ThreadUpdater.update() if sec <= 0
unless n = --ThreadUpdater.seconds
ThreadUpdater.update()
else if n <= -60
ThreadUpdater.set 'status', 'Retrying', null
ThreadUpdater.update()
else if n > 0
ThreadUpdater.set 'timer', n
update: ->
return unless navigator.onLine
@ -202,12 +198,7 @@ ThreadUpdater =
ThreadUpdater.set 'timer', 'Update'
ThreadUpdater.req.abort() if ThreadUpdater.req
url = "//api.4chan.org/#{ThreadUpdater.thread.board}/res/#{ThreadUpdater.thread}.json"
ThreadUpdater.req = $.ajax url,
onabort: ThreadUpdater.cb.load
onloadend: ThreadUpdater.cb.load
ontimeout: ThreadUpdater.cb.load
timeout: $.MINUTE
,
ThreadUpdater.req = $.ajax url, onloadend: ThreadUpdater.cb.load,
whenModified: true
updateThreadStatus: (title, OP) ->

View File

@ -19,7 +19,7 @@ ThreadWatcher =
ThreadWatcher.fetchAllStatus()
@db.save()
Thread::callbacks.push
Thread.callbacks.push
name: 'Thread Watcher'
cb: @node

View File

@ -8,7 +8,7 @@ Unread =
@posts = []
@postsQuotingYou = []
Thread::callbacks.push
Thread.callbacks.push
name: 'Unread'
cb: @node
@ -90,7 +90,7 @@ Unread =
for quotelink in post.nodes.quotelinks when QR.db.get Get.postDataFromLink quotelink
Unread.postsQuotingYou.push post
Unread.openNotification post
return
return
openNotification: (post) ->
return unless Header.areNotificationsEnabled

View File

@ -10,7 +10,7 @@ QR =
else
$.ready @persist
Post::callbacks.push
Post.callbacks.push
name: 'Quick Reply'
cb: @node
@ -140,7 +140,7 @@ QR =
if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent
# Focus the captcha input on captcha error.
QR.captcha.nodes.input.focus()
if Conf['Captcha Warning Notifications']
if Conf['Captcha Warning Notifications'] and !d.hidden
QR.notify el
else
$.addClass QR.captcha.nodes.input, 'error'
@ -152,22 +152,23 @@ QR =
notify: (el) ->
notice = new Notice 'warning', el
QR.notifications.push notice
return unless Header.areNotificationsEnabled
notif = new Notification el.textContent,
body: el.textContent
icon: Favicon.logo
notif.onclick = -> window.focus()
<% if (type === 'crx') { %>
# Firefox automatically closes notifications
# so we can't control the onclose properly.
notif.onclose = -> notice.close()
notif.onshow = ->
setTimeout ->
notif.onclose = null
notif.close()
, 7 * $.SECOND
<% } %>
unless Header.areNotificationsEnabled and d.hidden
QR.notifications.push notice
else
notif = new Notification el.textContent,
body: el.textContent
icon: Favicon.logo
notif.onclick = -> window.focus()
<% if (type === 'crx') { %>
# Firefox automatically closes notifications
# so we can't control the onclose properly.
notif.onclose = -> notice.close()
notif.onshow = ->
setTimeout ->
notif.onclose = null
notif.close()
, 7 * $.SECOND
<% } %>
notifications: []
@ -445,7 +446,6 @@ QR =
e.preventDefault()
QR.open()
QR.handleFiles e.dataTransfer.files
$.addClass QR.nodes.el, 'dump'
paste: (e) ->
files = []
@ -1247,12 +1247,15 @@ QR =
ThreadUpdater.postID = postID
# Post/upload confirmed as successful.
$.event 'QRPostSuccessful', {
board: g.BOARD
threadID
postID
}
$.event 'QRPostSuccessful_', {threadID, postID}
# Enable auto-posting if we have stuff left to post, disable it otherwise.
postsCount = QR.posts.length - 1

View File

@ -16,10 +16,10 @@ QuoteBacklink =
format = Conf['backlink'].replace /%id/g, "' + id + '"
@funk = Function 'id', "return '#{format}'"
@containers = {}
Post::callbacks.push
Post.callbacks.push
name: 'Quote Backlinking Part 1'
cb: @firstNode
Post::callbacks.push
Post.callbacks.push
name: 'Quote Backlinking Part 2'
cb: @secondNode
firstNode: ->
@ -58,4 +58,4 @@ QuoteBacklink =
$.addClass @nodes.post, 'quoted'
getContainer: (id) ->
@containers[id] or=
$.el 'span', className: 'container'
$.el 'span', className: 'container'

View File

@ -7,7 +7,7 @@ QuoteCT =
# \u00A0 is nbsp
@text = '\u00A0(Cross-thread)'
Post::callbacks.push
Post.callbacks.push
name: 'Mark Cross-thread Quotes'
cb: @node
node: ->

View File

@ -18,7 +18,7 @@ QuoteInline =
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node
Post::callbacks.push
Post.callbacks.push
name: 'Quote Inlining'
cb: @node

View File

@ -7,7 +7,7 @@ QuoteOP =
# \u00A0 is nbsp
@text = '\u00A0(OP)'
Post::callbacks.push
Post.callbacks.push
name: 'Mark OP Quotes'
cb: @node

View File

@ -5,7 +5,7 @@ QuotePreview =
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node
Post::callbacks.push
Post.callbacks.push
name: 'Quote Previewing'
cb: @node

View File

@ -2,7 +2,7 @@ QuoteStrikeThrough =
init: ->
return if g.VIEW is 'catalog' or !Conf['Reply Hiding Buttons'] and !Conf['Reply Hiding Link'] and !Conf['Filter']
Post::callbacks.push
Post.callbacks.push
name: 'Strike-through Quotes'
cb: @node
@ -12,4 +12,4 @@ QuoteStrikeThrough =
{boardID, postID} = Get.postDataFromLink quotelink
if g.posts["#{boardID}.#{postID}"]?.isHidden
$.addClass quotelink, 'filtered'
return
return

View File

@ -20,7 +20,7 @@ QuoteThreading =
$.on d, '4chanXInitFinished', @setup
Post::callbacks.push
Post.callbacks.push
name: 'Quote Threading'
cb: @node

View File

@ -11,7 +11,9 @@ QuoteYou =
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node
Post::callbacks.push
# \u00A0 is nbsp
@text = '\u00A0(You)'
Post.callbacks.push
name: 'Mark Quotes of You'
cb: @node
@ -25,7 +27,7 @@ QuoteYou =
return unless @quotes.length
for quotelink in @nodes.quotelinks when QR.db.get Get.postDataFromLink quotelink
$.add quotelink, $.tn '\u00A0(You)'
$.add quotelink, $.tn QuoteYou.text
$.addClass quotelink, 'you'
$.addClass @nodes.root, 'quotesYou'
return

View File

@ -5,7 +5,7 @@ Quotify =
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node
Post::callbacks.push
Post.callbacks.push
name: 'Resurrect Quotes'
cb: @node
node: ->
@ -81,4 +81,9 @@ Quotify =
@nodes.quotelinks.push a
fixDeadlink: (deadlink) ->
if !(el = deadlink.previousSibling) or el.nodeName is 'BR'
green = $.el 'span',
className: 'quote'
$.before deadlink, green
$.add green, deadlink
$.replace deadlink, [deadlink.childNodes...]

View File

@ -3,7 +3,7 @@ Rice =
$.ready ->
Rice.nodes d.body
Post::callbacks.push
Post.callbacks.push
name: 'Rice Checkboxes'
cb: @node