Conflicts:
	builds/4chan-X.js
	builds/4chan-X.user.js
	builds/crx/script.js
This commit is contained in:
Zixaphir 2013-04-24 13:52:16 -07:00
commit 3e5c99cd15
27 changed files with 629 additions and 1765 deletions

View File

@ -1,132 +0,0 @@
## 3.2.0 - *2013-04-23*
- The top and bottom original board lists are now optional, disabled by default.
- The button to show a hidden announcement is now inside the header's menu.
- Reorganized Header menu:<br>![menu](src/img/changelog/3.2.0/0.png)
- Added the `board-replace` setting to Custom Board Navigation ricing.
- Added the option `Cooldown Prediction`, enabled by default.
- Added the option `Hide Unread Count at (0)`, disabled by default.
### 3.1.4 - *2013-04-17*
- Fix QR remembering the file spoiler state when it shouldn't, for real this time.
- Fix inputs in the `Rice` tab being empty when `Custom Board Navigation` is disabled.
### 3.1.3 - *2013-04-16*
- Fix Chrome freezing when switching from the `Filter` tab to another tab in the settings.
### 3.1.2 - *2013-04-16*
- Fix error with successful posting.
### 3.1.1 - *2013-04-16*
- Styling adjustments for the announcement toggler.
## 3.1.0 - *2013-04-16*
- **New feature**: `Announcement Hiding`, enabled by default.
- Fix support for www.4chan.org/frames on Chrome.
- Fix quote features not working on dead quotelinks in inlined posts.
- Fix resurrecting dead quotelinks on HTTP.
### 3.0.6 - *2013-04-14*
- Fix regression concerning thread selection when quoting on the index.
### 3.0.5 - *2013-04-14*
- `Scroll to Last Read Post` is now optional, enabled by default.
- The QR won't auto-hide when auto-hide is enabled and one of its input is focused. Doesn't work on Firefox.
- Added the `Remember QR Size` setting back in, disabled by default. Only on Firefox.
- Fix QR remembering the file spoiler state when it shouldn't.
- Fix QR cooldown in Opera.
### 3.0.4 - *2013-04-11*
- More minor fixes.
### 3.0.3 - *2013-04-10*
- Minor fixes.
### 3.0.2 - *2013-04-09*
- Added a setting in the Header's menu to move it at the bottom of the screen.
- Added the `Cooldown` setting back in.
- Fixed the Header going above posts when following quotelinks for example.
- Fixed a bug where dead quotelinks would disappear.
### 3.0.1 - *2013-04-08*
- Added the possibility to combine board-list toggle and custom text.
- Added Reply Navigation back in, disabled by default.
- Fixed Thread Hiding initialization error.
# 3.0.0 - *2013-04-07*
**Major rewrite of 4chan X.**
Header:
- Easily access features and the boards list directly from the Header.
- The board list can be customized.
- The Header can be automatically hidden.
Extension-related changes for Chrome and Opera:
- Installing and updating is now pain-free on Chrome.
- Settings will persist on different subdomains and protocols (HTTP/HTTPS).
- Settings will persist in Incognito on Chrome.
- Clearing your cookies won't erase your settings anymore.
- Fixed Chrome's install warning saying that 4chan X would run on all web sites.
Egocentrism:
- `(You)` will be added to quotes linking to your posts.
- The Unread tab icon will indicate new unread posts quoting you with an exclamation mark.
Quick Reply changes:
- Opening text files will insert their content in the comment field.
- Pasting files/images (e.g. from another website) in Chrome will open them in the QR.
- Cooldown start time is now more accurate, which means shorter cooldown period and faster auto-posting.
- Cooldown remaining time will adjust to your upload speed and file size for faster auto-posting.
- Clicking the submit button while uploading will abort the upload and won't start re-uploading automatically anymore.
- Closing the QR while uploading will abort the upload and won't close the QR anymore.
- Creating threads outside of the index is now possible.
- Selection-to-quote also applies to selected text inside the post, not just inside the comment.
- Added support for thread creation in the catalog.
- Added thumbnailing support for Opera.
Image Expansion changes:
- The toggle and settings are now located in the Header's shortcuts and menu.
- Expanding spoilers along with all non-spoiler images is now optional, and disabled by default.
- Expanding OP images won't squish replies anymore.
Thread Updater changes:
- The Thread Updater will now notify of sticky/closed status change and update the icons.
- The Thread Updater will pause when offline, and resume when online.
- Added a setting to always auto-scroll to the bottom instead of the first new post.
Unread posts changes:
- Added a line to distinguish read posts from unread ones.
- Read posts won't be marked as unread after reloading a thread.
- The page will scroll to the last read post after reloading a thread.
- Visible posts will not be taken into account towards the unread count.
Thread Stats changes:
- Post and file count will now adjust with deleted posts.
- The post count will now become red past the bump limit.
- The file count will not become red anymore inside sticky threads.
Thread/Post Hiding changes:
- Added Thread & Post Hiding in the Menu, with individual settings.
- Thread & Post Hiding Buttons can now be disabled in the settings.
- Recursive Hiding will be automatically applied when manually showing/hiding a post.
Other:
- Added touch and multi-touch support for dragging windows.
- Added [eqn] and [math] tags keybind.
- Fix Chrome's install warning saying that 4chan X would execute on all domains.
- Fix Quote Backlinks and Quote Highlighting not affecting inlined quotes.
- Fix unreadable inlined posts with the Tomorrow theme.
- Fix user ID highlighting on fetched posts.
- More fixes and improvements.

View File

@ -1,50 +0,0 @@
## Reporting bugs and suggestions
Reporting bugs:
1. Make sure both your **browser** and **4chan X** are up to date.
2. Disable your other extensions & scripts to identify conflicts.
3. If your issue persists, open a [new issue](https://github.com/MayhemYDG/4chan-x/issues) with the following information:
1. Precise steps to reproduce the problem, with the expected and actual results.
2. Console errors, if any.
3. Browser version.
4. Your exported settings.
Open your console with:
- `Ctrl + Shift + J` on Chrome.
- `Ctrl + Shift + K` on Firefox.
- `Ctrl + Shift + O` on Opera.
Respect these guidelines:
- Describe the issue clearly, put some effort into it. A one-liner isn't a good enough description.
- If you want to get your suggestion implemented sooner, make it convincing.
- If you want to criticize, make it convincing and constructive.
- Be mature. Act like an idiot and you will be blocked without warning.
## Development & Contribution
### Get started
- Install [node.js](http://nodejs.org/).
- Install [Grunt's CLI](http://gruntjs.com/) with `npm install -g grunt-cli`.
- Clone 4chan X.
- `cd` into it.
- Install/Update 4chan X dependencies with `npm install`.
### Build
- Build with `grunt`.
- Continuously build with `grunt watch`.
### Release
- Update the version with `grunt patch`, `grunt minor` or `grunt major`.
- Release with `grunt release`.
Note: this is only used to release new 4chan X versions, and is **not** needed or wanted in pull requests.
### Contribute
- Edit the CoffeeScript sources.
- If the edits affect regular users, edit the changelog.
- Open a pull request.

View File

@ -47,7 +47,7 @@ module.exports = (grunt) ->
userscript:
options: concatOptions
files:
'builds/<%= pkg.name %>.meta.js': 'src/metadata.js'
'builds/<%= pkg.name %>.meta.js': 'src/meta/metadata.js'
'builds/<%= pkg.name %>.user.js': [
'src/meta/metadata.js'
'src/meta/banner.js'

106
LICENSE
View File

@ -1,22 +1,88 @@
Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
Copyright (c) 2012-2013 Nicolas Stepien <stepien.nicolas@gmail.com>
/*
* 4chan x - Version 1.0.10 - 2013-04-23
*
* Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/4chanX/LICENSE
*
* Appchan X Copyright © 2013-2013 Zixaphir <zixaphirmoxphar@gmail.com>
* http://zixaphir.github.io/appchan-x/
* 4chan x Copyright © 2009-2011 James Campos <james.r.campos@gmail.com>
* https://github.com/aeosynth/4chan-x
* 4chan x Copyright © 2012-2013 Nicolas Stepien <stepien.nicolas@gmail.com>
* https://4chan-x.just-believe.in/
* 4chan x Copyright © 2013-2013 Jordan Bates <saudrapsmann@gmail.com>
* http://seaweedchan.github.io/4chan-x/
* 4chan x Copyright © 2012-2013 ihavenoface
* http://ihavenoface.github.io/4chan-x/
* OneeChan Copyright © 2011-2013 Jordan Bates <saudrapsmann@gmail.com>
* http://seaweedchan.github.io/oneechan/
* 4chan SS Copyright © 2011-2013 Ahodesuka
* https://github.com/ahodesuka/4chan-Style-Script/
* Raphael Icons Copyright © 2013 Dmitry Baranovskiy
* http://raphaeljs.com/icons/
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Contributors:
* aeosynth
* mayhemydg
* noface
* !K.WeEabo0o
* blaise
* that4chanwolf
* desuwa
* seaweed
* e000
* ahodesuka
* Shou
* ferongr
* xat
* Ongpot
* thisisanon
* Anonymous
* Seiba
* herpaderpderp
* WakiMiko
* btmcsweeney
* AppleBloom
*
* All the people who've taken the time to write bug reports.
*
* Thank you.
*/
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
/*
* Linkify based on:
* http://downloads.mozdev.org/greasemonkey/linkify.user.js
* https://github.com/MayhemYDG/LinkifyPlusFork
*
* Originally written by Anthony Lieuallen of http://arantius.com/
* Licensed for unlimited modification and redistribution as long as
* this notice is kept intact.
*/
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
/*
* JSColor, JavaScript Color Picker
*
* @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
* @author Jan Odvarko, http://odvarko.cz
* @link http://JSColor.com
*/

View File

@ -1,8 +1,38 @@
# 4chan X
# Get 4chan X [HERE](http://seaweedchan.github.io/4chan-x/).
Get it [here](https://4chan-x.just-believe.in/).
## Reporting bugs
***
1. Make sure your **browser** & **4chan X** are up to date.
2. Please include as much information as possible, including your internet browser
3. Disable your other extensions & scripts.
4. If your issue persists:
1. Report precise steps to reproduce the problem.
2. Report console errors, if any.
3. Report browser and browser version.
### [MIT License](/LICENSE)
### [Contribute](/CONTRIBUTING.md)
Open your console with:
- `Ctrl + Shift + J` on Chrome & Firefox
- `Ctrl + Shift + O` on Opera.
## Development & Contribution
### Get started
- Clone 4chan X.
- `cd` into it.
- Install [node.js](http://nodejs.org/).
- Install [Grunt's CLI](http://gruntjs.com/) with `npm install -g grunt-cli`.
- Install 4chan X dependencies with `npm install`.
### Build
- Build with `grunt`.
- For development (continuous builds), run `grunt watch`.
### Contributing
- Fork the repo
- Edit the CoffeeScript source
- Build the JavaScript
- If the edits affect regular users, edit the changelog
- Send a pull request

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,23 @@
// ==UserScript==
// @name 4chan X
// @version 1.1.0
// @namespace 4chan-X
// @description Cross-browser userscript for maximum lurking on 4chan.
// @copyright 2013-2013 Zixaphir <zixaphirmoxphar@gmail.com>
// @copyright 2013-2013 Jordan Bates <saudrapsmann@gmail.com>
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
// @copyright 2012-2013 Nicolas Stepien <stepien.nicolas@gmail.com>
// @license MIT; http://en.wikipedia.org/wiki/Mit_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==

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
{
"name": "4chan X",
"version": "3.2.0",
"version": "1.1.0",
"manifest_version": 2,
"description": "Cross-browser extension for productive lurking on 4chan.",
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"icons": {
"16": "icon16.png",
"48": "icon48.png",
@ -14,7 +14,7 @@
"all_frames": true,
"run_at": "document_start"
}],
"homepage_url": "https://4chan-x.just-believe.in/",
"homepage_url": "http://seaweedchan.github.io/4chan-x/",
"minimum_chrome_version": "26",
"permissions": [
"storage"

File diff suppressed because one or more lines are too long

71
changelog Normal file
View File

@ -0,0 +1,71 @@
master
1.0.10:
-Add message pertaining to rewrite
1.0.9:
ihavenoface:
-Implement Announcement Hiding
seaweedchan:
-Change #options back to inheriting colors from replies
-Fix script breaking when disabling image expansion
1.0.8:
seaweedchan:
-Redo settings menu styling
-Move Export/Import buttons and dialog
-Update license and use banner.js for license
1.0.7:
qqueue:
-Relative post dates
MayhemYDG:
-Exporting/importing settings
1.0.6
seaweedchan:
-Update supported boards for archive redirection and custom navigation
-Point to github.io instead of github.com for pages
-Fix post archive link for InstallGentoo and Foolz
-Make InstallGentoo default for /g/
-Fix embedding issues
1.0.5:
seaweedchan:
-Added keybind to toggle Fappe Tyme
-Fix code tag keybind
Zixaphir:
-Add 'yourPost' class to own replies
1.0.4:
seaweedchan:
-Fix Fappe Tyme
-Re-add label for image expanding
-Move restore button to left side as per RiDeag
1.0.3
seaweedchan:
-Add ad-blocking CSS into Custom CSS examples
Zixaphir:
-Fix ctrl+s bringing up save dialog
-Fix issues with soundcloud embedding
1.0.2:
seaweedchan:
-New Rice option: Emoji Position
-New layout for Rice tab
-No more Yotsuba / Yotsuba B in options
1.0.1:
-New option: Emoji
-New Rice option: Sage Emoji
seaweedchan:
-Prettier error messages
1.0.0
-Initial release
zixaphir:
-Fix unread post count for filtered posts
-Fix issues when switching from ihavenoface's fork
-Fix backlinks not receiving filtered class
-Fix QR position not saving on refresh

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,22 @@
{
"name": "4chan-X",
"version": "3.2.0",
"description": "Cross-browser extension for productive lurking on 4chan.",
"version": "1.1.0",
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",
"repo": "https://github.com/MayhemYDG/4chan-x/",
"page": "https://4chan-x.just-believe.in/",
"buildsPath": "builds/",
"mainBranch": "v3",
"repo": "https://github.com/seaweedchan/4chan-x/",
"page": "http://seaweedchan.github.io/4chan-x/",
"mainBranch": "master",
"matches": [
"*://api.4chan.org/*",
"*://boards.4chan.org/*",
"*://images.4chan.org/*",
"*://sys.4chan.org/*"
]
],
"files": {
"metajs": "4chan_X.meta.js",
"userjs": "4chan_X.user.js"
}
},
"devDependencies": {
"grunt": "~0.4.1",
@ -29,10 +32,12 @@
},
"repository": {
"type": "git",
"url": "git://github.com/MayhemYDG/4chan-x.git"
"url": "https://github.com/seaweedchan/4chan-x.git"
},
"author": "Nicolas Stepien <stepien.nicolas@gmail.com>",
"author": "seaweedchan <jtbates@asu.edu>",
"contributors": [
"Zixaphir<zixaphirmoxphar@gmail.com>",
"Nicolas Stepien <stepien.nicolas@gmail.com>",
"James Campos <james.r.campos@gmail.com>"
],
"license": "MIT",

View File

@ -401,7 +401,7 @@ http://iqdb.org/?url=%TURL
'Bottom Header': false
'Header catalog links': false
'Bottom Board List': false
'Custom Board Navigation': false
'Custom Board Navigation': true
boardnav: '[ toggle-all ] [current-title]'
@ -422,11 +422,11 @@ http://iqdb.org/?url=%TURL
'Toggle the full board list.'
]
'Open empty QR': [
'l'
'i'
'Open QR without post number inserted.'
]
'Open QR': [
'Shift+l'
'Shift+i'
'Open QR with post number inserted.'
]
'Open settings': [

View File

@ -8,11 +8,11 @@
}
/* Header */
:root.burichan #header-bar {
:root.burichan #header-bar, :root.burichan #header-bar #notifications {
font-size: 11pt;
color: #89A;
}
:root.burichan #header-bar a {
:root.burichan #header-bar a, :root.burichan #header-bar #notifications a {
color: #34345C;
}

View File

@ -8,11 +8,11 @@
}
/* Header */
:root.futaba #header-bar {
:root.futaba #header-bar, :root.futaba #notifications {
font-size: 11pt;
color: #B86;
}
:root.futaba #header-bar a {
:root.futaba #header-bar a, :root.futaba #notifications a {
color: #800000;
}

View File

@ -8,11 +8,11 @@
}
/* Header */
:root.photon #header-bar {
:root.photon #header-bar, :root.photon #notifications {
font-size: 9pt;
color: #333;
}
:root.photon #header-bar a {
:root.photon #header-bar a, :root.photon #notifications a {
color: #FF6600;
}

View File

@ -166,7 +166,7 @@ a[href="javascript:;"] {
.fixed.bottom #header-bar #scroll-marker {
bottom: 100%;
}
#header-bar a:not(.entry) {
#header-bar a:not(.entry):not(.close) {
text-decoration: none;
padding: 1px;
}
@ -312,13 +312,13 @@ a[href="javascript:;"] {
font-weight: 700;
}
.section-sauce ul,
.section-rice ul {
.section-advanced ul {
list-style: none;
margin: 0;
padding: 8px;
}
.section-sauce li,
.section-rice li {
.section-advanced li {
padding-left: 4px;
}
.section-main label {
@ -336,10 +336,10 @@ a[href="javascript:;"] {
.section-sauce textarea {
height: 350px;
}
.section-rice .field[name="boardnav"] {
.section-advanced .field[name="boardnav"] {
width: 100%;
}
.section-rice textarea {
.section-advanced textarea {
height: 150px;
}
#fourchanx-settings fieldset {
@ -646,8 +646,7 @@ input.field.tripped:not(:hover):not(:focus) {
width: 100%;
margin: 1px 0 0;
}
.field,
.selectrice {
.field {
-moz-box-sizing: border-box;
margin: 0px;
padding: 2px 4px 3px;

View File

@ -8,11 +8,11 @@
}
/* Header */
:root.tomorrow #header-bar {
:root.tomorrow #header-bar, :root.tomorrow #notifications {
font-size: 9pt;
color: #C5C8C6;
}
:root.tomorrow #header-bar a {
:root.tomorrow #header-bar a, :root.tomorrow #notifications a {
color: #81A2BE;
}

View File

@ -8,11 +8,11 @@
}
/* Header */
:root.yotsuba-b #header-bar {
:root.yotsuba-b #header-bar, :root.yotsuba-b #notifications {
font-size: 9pt;
color: #89A;
}
:root.yotsuba-b #header-bar a {
:root.yotsuba-b #header-bar a, :root.yotsuba-b #notifications a {
color: #34345C;
}

View File

@ -8,11 +8,11 @@
}
/* Header */
:root.yotsuba #header-bar {
:root.yotsuba #header-bar, :root.yotsuba #notifications {
font-size: 9pt;
color: #B86;
}
:root.yotsuba #header-bar a {
:root.yotsuba #header-bar a, :root.yotsuba #notifications a {
color: #800000;
}

View File

@ -103,7 +103,7 @@ Header =
boardList = $.el 'span',
id: 'board-list'
innerHTML: "<span id=custom-board-list></span><span id=full-board-list hidden><span class='hide-board-list-button brackets-wrap'><a href=javascript:;> - </a></span>#{fourchannav.innerHTML}</span>"
innerHTML: "<span id=custom-board-list></span><span id=full-board-list hidden>[<a href=javascript:; class='hide-board-list-button'> - </a>] #{fourchannav.innerHTML}</span>"
fullBoardList = $ '#full-board-list', boardList
btn = $ '.hide-board-list-button', fullBoardList
$.on btn, 'click', Header.toggleBoardList
@ -257,7 +257,7 @@ Header =
Header.setCustomNav @checked
editCustomNav: ->
Settings.open 'Rice'
Settings.open 'Advanced'
settings = $.id 'fourchanx-settings'
$('input[name=boardnav]', settings).focus()

View File

@ -26,21 +26,20 @@ Unread =
$.on d, 'ThreadUpdate', Unread.onUpdate
$.on d, 'scroll visibilitychange', Unread.read
$.on d, 'visibilitychange', Unread.setLine if Conf['Unread Line']
$.on window, 'load', Unread.scroll if Conf['Scroll to Last Read Post']
return unless Conf['Scroll to Last Read Post']
$.on window, 'load', ->
# Let the header's onload callback handle it.
return if (hash = location.hash.match /\d+/) and hash[0] of @posts
if Unread.posts.length
# Scroll to before the first unread post.
while root = $.x 'preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root
break unless (Get.postFromRoot root).isHidden
return unless root
root.scrollIntoView false
else if posts.length
# Scroll to the last read post.
Header.scrollToPost (posts[posts.length - 1]).nodes.root
scroll: ->
# Let the header's onload callback handle it.
return if (hash = location.hash.match /\d+/) and hash[0] of Unread.thread.posts
if Unread.posts.length
# Scroll to before the first unread post.
while root = $.x 'preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root
break unless (Get.postFromRoot root).isHidden
root.scrollIntoView false
return
# Scroll to the last read post.
posts = Object.keys Unread.thread.posts
Header.scrollToPost Unread.thread.posts[posts[posts.length - 1]].nodes.root
sync: ->
lastReadPost = Unread.db.get

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,21 +1,80 @@
/* <%= meta.name %> - Version <%= version %> - <%= grunt.template.today('yyyy-mm-dd') %>
* <%= meta.page %>
*
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
* Copyright (c) 2012-<%= grunt.template.today('yyyy') %> Nicolas Stepien <stepien.nicolas@gmail.com>
* Licensed under the MIT license.
* <%= meta.repo %>blob/master/LICENSE
*
* Contributors:
* <%= meta.repo %>graphs/contributors
* Non-GitHub contributors:
* ferongr, xat-, Ongpot, thisisanon and Anonymous - favicon contributions
* e000 - cooldown sanity check
* Seiba - chrome quick reply focusing
* herpaderpderp - recaptcha fixes
* WakiMiko - recaptcha tab order http://userscripts.org/scripts/show/82657
*
* All the people who've taken the time to write bug reports.
*
* Thank you.
*/
/*
* <%= meta.name %> - Version <%= version %> - <%= grunt.template.today('yyyy-mm-dd') %>
*
* Licensed under the MIT license.
* <%= meta.repo %>blob/master/LICENSE
*
* Appchan X Copyright © 2013-<%= grunt.template.today('yyyy') %> Zixaphir <zixaphirmoxphar@gmail.com>
* http://zixaphir.github.io/appchan-x/
* 4chan x Copyright © 2009-2011 James Campos <james.r.campos@gmail.com>
* https://github.com/aeosynth/4chan-x
* 4chan x Copyright © 2012-<%= grunt.template.today('yyyy') %> Nicolas Stepien <stepien.nicolas@gmail.com>
* https://4chan-x.just-believe.in/
* 4chan x Copyright © 2013-<%= grunt.template.today('yyyy') %> Jordan Bates <saudrapsmann@gmail.com>
* http://seaweedchan.github.io/4chan-x/
* 4chan x Copyright © 2012-<%= grunt.template.today('yyyy') %> ihavenoface
* http://ihavenoface.github.io/4chan-x/
* OneeChan Copyright © 2011-<%= grunt.template.today('yyyy') %> Jordan Bates <saudrapsmann@gmail.com>
* http://seaweedchan.github.io/oneechan/
* 4chan SS Copyright © 2011-<%= grunt.template.today('yyyy') %> Ahodesuka
* https://github.com/ahodesuka/4chan-Style-Script/
* Raphael Icons Copyright © <%= grunt.template.today('yyyy') %> Dmitry Baranovskiy
* http://raphaeljs.com/icons/
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Contributors:
* aeosynth
* mayhemydg
* noface
* !K.WeEabo0o
* blaise
* that4chanwolf
* desuwa
* seaweed
* e000
* ahodesuka
* Shou
* ferongr
* xat
* Ongpot
* thisisanon
* Anonymous
* Seiba
* herpaderpderp
* WakiMiko
* btmcsweeney
* AppleBloom
*
* All the people who've taken the time to write bug reports.
*
* Thank you.
*/
/*
* Linkify based on:
* http://downloads.mozdev.org/greasemonkey/linkify.user.js
* https://github.com/MayhemYDG/LinkifyPlusFork
*
* Originally written by Anthony Lieuallen of http://arantius.com/
* Licensed for unlimited modification and redistribution as long as
* this notice is kept intact.
*/

View File

@ -3,8 +3,10 @@
// @version <%= version %>
// @namespace <%= name %>
// @description <%= description %>
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
// @copyright 2012-<%= grunt.template.today('yyyy') %> Nicolas Stepien <stepien.nicolas@gmail.com>
// @copyright 2013-<%= grunt.template.today('yyyy') %> Zixaphir <zixaphirmoxphar@gmail.com>
// @copyright 2013-<%= grunt.template.today('yyyy') %> Jordan Bates <saudrapsmann@gmail.com>
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
// @copyright 2012-<%= grunt.template.today('yyyy') %> Nicolas Stepien <stepien.nicolas@gmail.com>
// @license MIT; http://en.wikipedia.org/wiki/Mit_license
<%=
meta.matches.map(function(match) {
@ -16,7 +18,7 @@
// @grant GM_deleteValue
// @grant GM_openInTab
// @run-at document-start
// @updateURL <%= meta.page %><%= meta.buildsPath %><%= name %>.meta.js
// @downloadURL <%= meta.page %><%= meta.buildsPath %><%= name %>.user.js
// @updateURL <%= meta.repo %>raw/stable/builds/<%= meta.files.metajs %>
// @downloadURL <%= meta.repo %>raw/stable/builds/<%= meta.files.userjs %>
// @icon data:image/png;base64,<%= grunt.file.read('src/img/icon48.png', {encoding: 'base64'}) %>
// ==/UserScript==
// ==/UserScript==

View File

@ -30,7 +30,7 @@ Settings =
Settings.addSection 'Main', Settings.main
Settings.addSection 'Filter', Settings.filter
Settings.addSection 'Sauce', Settings.sauce
Settings.addSection 'Rice', Settings.rice
Settings.addSection 'Advanced', Settings.advanced
Settings.addSection 'Keybinds', Settings.keybinds
$.on d, 'AddSettingsSection', Settings.addSection
@ -375,7 +375,7 @@ Settings =
sauce.value = item['sauces']
$.on sauce, 'change', $.cb.value
rice: (section) ->
advanced: (section) ->
section.innerHTML = """
<fieldset>
<legend>Archiver</legend>
@ -383,7 +383,7 @@ Settings =
<select name=archiver></select>
</fieldset>
<fieldset>
<legend>Custom Board Navigation <span class=warning #{if Conf['Custom Board Navigation'] then 'hidden' else ''}>is disabled.</span></legend>
<legend>Custom Board Navigation</span></legend>
<div><input name=boardnav class=field spellcheck=false></div>
<div>In the following, <code>board</code> can translate to a 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>