From 2aa4adf4dd0918addb8a7f5c777fc011122d76b7 Mon Sep 17 00:00:00 2001 From: Moebius-Strip Date: Sat, 11 Nov 2017 23:19:45 -0500 Subject: [PATCH 1/2] FF57+GM4 warning & localStorage auto backup * Added a warning for Greasemonkey users about the upcoming changes and automatically backed up their settings with the old method to localStorage. --- better-better-booru.user.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/better-better-booru.user.js b/better-better-booru.user.js index b44878c..e9869bf 100644 --- a/better-better-booru.user.js +++ b/better-better-booru.user.js @@ -2557,7 +2557,7 @@ function bbbScript() { // Wrapper for injecting the script into the document. helpButton.href = "#"; helpButton.innerHTML = "Help"; helpButton.className = "bbb-list-button"; - helpButton.bbbSetTip("Name: The name you want to refer to this group of tags by when using the group metatag. Names may not contain spaces or commas. Tags: Describes the posts that the group should match. Please read the \"thumbnail matching rules\" section under the help tab for information about creating rules. When used, all tags in a group are treated as if they're grouped/nested together (enclosed in parentheses). Move: Move the group to a new position. The order of groups affects the order they display in for tag autocomplete. Delete: Remove the group and its settings.New: Create a new group. ExampleIf given a group named\"hidden\" that contains \"~loli ~shota ~toddlercon ~status:banned\" for its tags, a search for \"rating:questionable -group:hidden\" would behave like \"rating:questionable -( ~loli ~shota ~toddlercon ~status:banned )\".TipsThe \"group\" metatag can be shortened to \"g\".

Groups used by themselves with the quick search option can provide a saved search functionality.

A blacklist or border entry (especially a complex one) that you want to work exclusively from other entries can be assigned to a group and excluded from other entries by using \"-group:entryname\". Updating that group will then update all entries linked to it. Similarly, tags you want shared across multiple entries can just use \"group:entryname\"."); + helpButton.bbbSetTip("Name: The name you want to refer to this group of tags by when using the group metatag. Names may not contain spaces or commas. Tags: Describes the posts that the group should match. Please read the \"thumbnail matching rules\" section under the help tab for information about creating rules. When used, all tags in a group are treated as if they're grouped/nested together (enclosed in parentheses). Move: Move the group to a new position. The order of groups affects the order they display in for tag autocomplete. Delete: Remove the group and its settings.New: Create a new group. ExampleIf given a group named \"hidden\" that contains \"~loli ~shota ~toddlercon ~status:banned\" for its tags, a search for \"rating:questionable -group:hidden\" would behave like \"rating:questionable -( ~loli ~shota ~toddlercon ~status:banned )\".TipsThe \"group\" metatag can be shortened to \"g\".

Groups used by themselves with the quick search option can provide a saved search functionality.

A blacklist or border entry (especially a complex one) that you want to work exclusively from other entries can be assigned to a group and excluded from other entries by using \"-group:entryname\". Updating that group will then update all entries linked to it. Similarly, tags you want shared across multiple entries can just use \"group:entryname\"."); editSpan.appendChild(helpButton); var groupSettingsDiv = document.createElement("div"); @@ -3344,6 +3344,12 @@ function bbbScript() { // Wrapper for injecting the script into the document. deleteData("bbb_thumb_cache"); case "8.0": + case "8.0.1": + if (reason !== "backup") { + cleanLocalStorage("autocomplete"); + localStorage.bbbSetItem("bbb_settings", JSON.stringify(bbb.user)); + bbbNotice("Upon the release of Firefox 57 and the move over to Greasemonkey 4, BBB will not be able to fully support Greasemonkey due to decisions the developers have made about loading and saving data. Greasemonkey users will have to revert back to using an older storage method that will still work while suffering a few disadvantages. Those disadvantages include: 1) A much more limited amount of space for storage. 2) The inability to have your settings persist across all Danbooru subdomains and during private browsing. If you are reading this, a copy of your settings has already been saved using the old method, but it is advised that you create a separate backup before updating to Firefox 57 to collect any new changes and/or guard against any unforeseen problems.", 0); + } break; } From 33f6d935fed8451ffdb7da8055ce5b82c78dc06b Mon Sep 17 00:00:00 2001 From: Moebius-Strip Date: Sat, 11 Nov 2017 23:27:25 -0500 Subject: [PATCH 2/2] Version 8.0.2 --- README.md | 2 +- better-better-booru.user.js | 4 ++-- changelog.md | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8288a37..4d8f652 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,9 @@ Features Installation ------------ 1. Installing a userscript manager is strongly recommended and sometimes required. Suggestions: - * [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/) (Firefox) * [Tampermonkey](http://tampermonkey.net/) (Chrome, Opera) * [Violentmonkey](https://addons.opera.com/extensions/details/violent-monkey/) (Opera) + * [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/) (Firefox) (Note: Setting/data storage is not fully supported.) 2. Open/install the script from a site or local computer file**. Please be sure you're using a trustworthy source. Recommendations: * [Greasy Fork](https://greasyfork.org/scripts/3575-better-better-booru) * [GitHub](https://github.com/pseudonymous/better-better-booru) diff --git a/better-better-booru.user.js b/better-better-booru.user.js index e9869bf..d0b835f 100644 --- a/better-better-booru.user.js +++ b/better-better-booru.user.js @@ -3,7 +3,7 @@ // @namespace https://greasyfork.org/scripts/3575-better-better-booru // @author otani, modified by Jawertae, A Pseudonymous Coder & Moebius Strip. // @description Several changes to make Danbooru much better. -// @version 8.0.1 +// @version 8.0.2 // @updateURL https://greasyfork.org/scripts/3575-better-better-booru/code/better_better_booru.meta.js // @downloadURL https://greasyfork.org/scripts/3575-better-better-booru/code/better_better_booru.user.js // @match *://*.donmai.us/* @@ -315,7 +315,7 @@ function bbbScript() { // Wrapper for injecting the script into the document. swapped: false // Whether the post content has been changed between the original and sample versions. }, options: { // Setting options and data. - bbb_version: "8.0.1", + bbb_version: "8.0.2", alternate_image_swap: newOption("checkbox", false, "Alternate Image Swap", "Switch between the sample and original image by clicking the image. NoteNotes can be toggled by using the link in the sidebar options section."), autohide_sidebar: newOption("dropdown", "none", "Auto-hide Sidebar", "Hide the sidebar for posts, favorites listings, and/or searches until the mouse comes close to the left side of the window or the sidebar gains focus.TipsBy using Danbooru's hotkey for the letter \"Q\" to place focus on the search box, you can unhide the sidebar.

Use the \"thumbnail count\" option to get the most out of this feature on search listings.", {txtOptions:["Disabled:none", "Favorites:favorites", "Posts:post", "Searches:search", "Favorites & Posts:favorites post", "Favorites & Searches:favorites search", "Posts & Searches:post search", "All:favorites post search"]}), autoscroll_post: newOption("dropdown", "none", "Auto-scroll Post", "Automatically scroll a post to a particular point. Below Header: Scroll the window down until the header is no longer visible or scrolling is no longer possible. Post Content: Position the post content as close as possible to the left and top edges of the window viewport when initially loading a post. Using this option will also scroll past any notices above the content.", {txtOptions:["Disabled:none", "Below Header:header", "Post Content:post"]}), diff --git a/changelog.md b/changelog.md index 6440317..1542c83 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ Changelog ---------- +* Version 8.0.2: + * Updated to notify Greasemonkey users about the upcoming changes Firefox 57 and Greasemonkey 4 will bring. * Version 8.0.1: * Removed the description text below images since Danbooru no longer displays it. * Fixed nested/grouped tags within other nested/grouped tags not having their parentheses processed properly.