============================== = Simple Link Grouper Manual = ============================== NAME Simple Link Grouper v1.0.5 - A tool that assists in managing lists of links in batch DESCRIPTION This is similar to `Link Converter`, `Quick Link Saver`, and `Minimalist Linker`. There are a couple differences that set this apart from the others. * Text handling is more mature * The markup syntax is different (see FORMATTING / MARKUP SYNTAX) * This is much faster than the others * This is the only tool in this collection to maintain a proper data structure rather than statically rendering everything * More user-friendly * More stable * More dynamic MAN PAGE Yes, this is presented in a style similar to a man page. It is one of the most efficient methods of laying out large amounts of information in plain text. INTERFACE The interface includes: * a textarea * some buttons * a container where links are shown Buttons: * Render - compiles textarea contents to renderable links * Dump - does the exact opposite of Render * Save - Saves data to storage (if allowed) * Others - self-explanatory FORMATTING / MARKUP SYNTAX Overview: Group (empty line) Group (empty line) ... Group: Title Link Link ... Link: Title | URL (or) URL URL: URL (or) -URL (a "viewed" URL) Example: My Group Example | http://example.com http://example.com My Other Group -http://example.com http://example.com Viewed Link | -http://example.com My Group Third Link | http://example.com Rendered: x My Group | Example 2 Third Link x My Other Group | 1 2 Viewed Link "Viewed Link" and "1" would come out black or not show at all, depending on options (black is the default) The two groups that are named "My Group" are merged into a single group. This will also show up when dumped back to the textarea. This can be configured. See options. In addition to the group merging functionality, renders can be stacked. That means if you render some groups while there is already rendered content, the groups will simply be added to the render. Also note that Groups are a required construct, but Links are not. It is not an error to have an empty group. A rendered group appears as such: x Group Title | Link1 Link2 ... Clicking on the `x` will delete that group from memory. Clicking on a link will open it, as expected. However, this will also take you away from the current page, and you'll lose your links. So I suggest middle-clicking or right-click->"open in new tab". Alternatively, if you have `Enable Link Marking` set (this is the default; see options), clicking on a link should instead result in a popup being opened in a new tab, left or middle. Should. I can't guarantee that your browser follows convention. If you are unsure, back up your data before left-clicking on a link. In Firefox and Chrome (tested), left clicking results in the page being opened in a new tab. In firefox, middle-clicking results in the page being opened twice in two new tabs. OLD SYNTAX The syntax used in the older tools is not supported here. I am referring to this syntax: Overview Link Link ... Link Link (OR) Link[Title] OPTIONS Enable Link Marking (default: true) When enabled, clicking links will mark them as "viewed" This setting does not affect urls that have already been marked, whether via source or a previous click with this setting enabled This overrides what happens when you click/middle-click on a link. A popup is opened (usually a new tab; depends on the browser) and the link is "marked". This does not affect the right click, so right-click->"Open in new tab" will never mark it. Hide Marked Links (default: false) When enabled, marked links will not be shown in rendered view Toggling this option triggers a re-render. Merge Groups with the same name (default: true) When enabled, Groups with the same name will be merged into a single group. When disabled, groups will be added faster (specifically, GroupList.add's time complexity will go from O(n) to O(1)), but I doubt the difference will be meaningful, especially considering that every group gets its own DOM element, which increases re-paint time. and that extra re-paint time probably cancels out any advantage you could possibly get by disabling this option unless you have literally thousands of links. Links on same line (default: true) When enabled, links are rendered on the same line. When disabled, links get their own line and the output resembles the markup format Enable Storage (default: false) A 3-state option. When enabled, text and options are saved to session/local Storage upon clicking `Render`, `Dump`, or `Save` partially-filled = sessionStorage fully-filled = localStorage That means that your links and settings will: * persist across the session per-tab (sessionStorage) * persist permantly across all tabs (localStorage) Closing the tab/browser will wipe sessionStorage clean (unless you un-close it, but that's up to the browser). So a browser crash will still kill everything, and if you plan to hold a list of links long-term, either save them to a text file or use localStorage. This has the advantage of adding some additional protection, but in the case of localStorage, carries the disadvantage that all tabs pull from one place, and thus you can't have individual instances running without risking race conditions. Unchecking this option will wipe the localStorage entry Additionally, the app will make every attempt to prevent you from accidentally losing data. If there are unsaved changed, navigating away from the tab should trigger a prompt asking if you're sure. BUGS There are currently no known bugs. (NB: Firefox's middle-click behavior is not a bug) There are quite a lot of corner cases. If you do happen to find a case where the app fails to, for example, prevent loss-of-data (outside of crashes), and can reproduce it, send me a bug report at `oenqragorfg@tznvy.pbz` use a ROT13 converter to decipher the real email. Make sure to include the following in your report: 1. Subject contains "Link Grouper Bug" (so I know what you're emailing me about) 2. A clear and concise list of steps to produce the bug (so I can test it) 3. Your browser and version (so I can test it) 4. Open your javascript console and copy any errors (so I know what to look for) 5. Any additional details such as addons, special cases, etc. Alternatively, you can create an issue on the gitlab repo. https://gitlab.com/bradenbest/simple-link-grouper/issues This is also a good way to suggest features, ideas, etc. BROWSER COMPATIBILITY This tool is tested in Firefox and Chrome. It should work in other webkit-based browsers (such as Safari and Midori), as well as other standards-compliant browsers such as Opera. This tool does not officially support Microsoft browsers. If it does happen to work (reasonably likely > IE 9), that's great. Though I strongly urge you to choose better software, such as any of the browsers listed above. INTERNET EXPLORER / EDGE I don't support Microsoft's proprietary browsers. They are notorious for disregarding web standards, and I refuse to compromise my code to accommodate a browser that doesn't properly implement the web standard. If I did, I'd be writing a polyglot, which is inappropriate for production. This is an HTML5 + JavaScript (ECMA 2015) app, not an MS-HTML + J-script app. IE does not implement JavaScript, but rather an esoteric in-house dialect of JavaScript known as J-script. J-script is extremely unsafe. For example, it implements a class called `ActiveXObject`, which grants the client user-level access to your filesystem. AUTHOR Simple Link Grouper by Braden Best, 2017, No rights reserved. Go crazy. (Just don't be evil.) OTHER ONETAB SCRAPER USERSCRIPT Here is a simple userscript for use with extensions like tampermonkey. It takes a OneTab shared tabs page and adds a button to scrape all of the links into a text blob compatible with the link grouper. // ==UserScript== // @name Onetab Link Scraper // @namespace Violentmonkey Scripts // @match *://*.one-tab.com/* // @grant none // @version 1.0 // @author Braden Best // @description 12/9/2019, 1:13:36 PM // ==/UserScript== function scrape(){ console.log("links copied to clipboard."); console.log("Go here to sort them: http://bradenbest.com/link-tools/link-grouper/"); return [...document.querySelectorAll("a[href]")].map(link => `${link.innerText}|${link.href}`).join("\n"); } (function(){ const button = document.createElement("button"); const button_click = () => navigator.clipboard.writeText(scrape()); button.innerText = "scrape and copy"; button.addEventListener("click", button_click); button.style.position = "fixed"; button.style.left = "50%"; button.style.top = "0"; document.body.appendChild(button); }()); // exports format: http://bradenbest.com/link-tools/link-grouper/ // for use with onetab shared tabs