From d89c7a9ffe5e5d7b5ab958c24de4004a02f99203 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 6 Jul 2015 20:45:57 -0700 Subject: [PATCH] Autodetect browser engine and hide instructions for other engines. --- README.md | 10 ++++++---- template.jst | 20 +++++++++++++++++++- web.css | 13 ++++++++++++- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index eef77dd12..77add5d05 100755 --- a/README.md +++ b/README.md @@ -6,13 +6,15 @@ Previously developed by [aeosynth](https://github.com/aeosynth/4chan-x), [Mayhem If you're looking for a maintained fork of OneeChan (a style script used in addition to 4chan X), try https://github.com/Nebukazar/OneeChan. -## Firefox +## Install + +### Firefox Install [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/), then **[click here to install 4chan X](https://ccd0.github.io/4chan-x/builds/4chan-X.user.js)**. - **Pale Moon** users should use [Greasemonkey 1.15](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/1.15.1-signed). - **SeaMonkey** users should use Greasemonkey 2.3 converted with [this tool](http://addonconverter.fotokraina.com/?url=https://addons.mozilla.org/firefox/downloads/file/282084/greasemonkey-2.3-fx.xpi). -## Chromium +### Chromium 4chan X is available as a Chrome extension. The Chrome extension has the additional feature of being able to sync your settings and data with other devices via Chrome Sync. - **Chromium**, **Chrome**, and **Vivaldi** users can **[install 4chan X from the Chrome store](https://chrome.google.com/webstore/detail/4chan-x/ohnjgmpcibpbafdlkimncjhflgedgpam)**. @@ -21,10 +23,10 @@ Install [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonk It is also possible to use the [userscript version of 4chan X](https://ccd0.github.io/4chan-x/builds/4chan-X.user.js) with [Tampermonkey](https://tampermonkey.net/). -## Safari +### Safari Install [JS Blocker](http://jsblocker.toggleable.com/), then **[click here to install 4chan X](https://ccd0.github.io/4chan-x/builds/4chan-X.user.js)**. -## WebKitGTK+ +### WebKitGTK+ Several WebKitGTK+ based browsers have support for userscripts and can run 4chan X. Due to the lack of the cross-site GM_* API, and lack of support for userscripts in iframes, not all features will work. You may experience crashes when repeatedly solving the default image-based captchas. You can avoid this problem by enabling `Use Recaptcha v1` in your settings. - **dwb**: Install the userscripts extension, then save the [script](https://ccd0.github.io/4chan-x/builds/4chan-X.user.js) to the `$XDG_CONFIG_HOME/dwb/greasemonkey` or `$HOME/.config/dwb/greasemonkey` directory (creating it if necessary): diff --git a/template.jst b/template.jst index a12d57d8e..d6e11806c 100644 --- a/template.jst +++ b/template.jst @@ -16,7 +16,14 @@ Screenshot -<%= content.match(/<\/h1>([^]*)

+<%= +content + .match(/<\/h1>([^]*)

.*?<\/h3>)([^]*?)(?=