Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

Logo

What is this exactly?

A script that helps with linking recurring recommendations and making answers more user friendly. You can provide a list of global keywords paired with a link and the script will automatically find these keywords whenever you write an answer and make them into links (if you choose so). The same as manually marking a word and pressing the link URL button and adding a URL but automated for your most used links. You can also choose if you want to make every occurrence of the keyword a link or just the first depending on what you think is cleaner.

DOWNLOAD

Any feedback very much appreciated!

About

I made this script because I answer quite a lot of questions on Video Production SE and in the video world there are hundreds of nifty little tools that help with a ton of different problems and I end up recommending many of them as a solution to specific problems, often in combination with other tools. I like to not just mention their name but also add a link to download them and receive more information about them. I think it greatly helps the reader who may have no idea about certain programs or places if you can just click on a link while reading an answer and don't have to open up google and search the thing I just mentioned.

That also goes for the basics, I don't want to just assume a user knows something just because the thing I mention is very well known in the industry. For example you mention a specific technique or effect, that might be well known by someone who does what you do for a few years now but certainly not the average beginner, so you may want to link to a wiki article or a product page for keywords specific to your field of expertize. This greatly helps with making your answers much more beginner friendly without lifting a finger (except for clicking the button and the initial work to add keywords).

Screenshots

Icon bar

Settings menu

How to use it

Add your keyword/link pairs by clicking on the URL button with the green circle on the right. The settings is simple JSON, currently it's not completely dummy proof but not possible to save invalid JSON.

You can add a new "slot" by clicking the green "add empty link" text on the bottom of the settings window or just manually add a new array entry. The first entry in a [] pair is the keyword, the second one the url. Then click the big yellow save button to save your changes. Closing the settings without clicking on save will discard your changes. You can close the settings by clicking outside the pop-up window, so beware.

Your settings are saved per SE site, so you will have a different set of links per SE. The settings are saved to your local browser storage.

If you are done writing your answer click on the URL button with the two blue arrows surrounding it and your keywords will be made into links if you happened to mention one.

A keyword is only recognized as such if it begins with space, {[(:; and or ends with .,:;!?}]) or space. Existing link markup that you manually added is ignored even if it happens to contain a keyword.

The URL button on the very right is a hotfix and will be removed in future versions. It reverts your text to how it was before you clicked the Auto-Link button for the first time. Clicking the Auto-Link button again won't save a new version, you will always revert to the version when you first clicked the button. The script is meant to be only run once after your done writing, this just there in case you changed your mind because at the moment the script changes aren't reversed by using the standard revert button (CTRL+Z), you will end up with an even earlier version when using the standard revert button depending on when your last draft was saved.

Known bugs/upcoming features

  • At the moment the script relies on a 2 second time out for the wmd.js script to execute (which adds the toolbar after page load). This is stupid and not reliable but works well in most cases, I will replace this with a reliable solution in the next version once I figured out how to do that.

  • No CTRL-Z support, extra button needed (if anyone knows how to add this to the CTRL-Z queue please contact me, I currently have no idea)

  • Settings not fool proof, needs auto fixing JSON and and/or JSON lint to highlight what exactly is wrong.

  • No option to wipe your settings

Be aware that this is in ALPHA status, I did a lot of bug testing with made up scenarios but haven't tested it much in the real world. It wont destroy your valuable answer (that's what the custom revert button is for in emergencies) but you may encounter bugs that could break the markup or other unexpected behavior that I didn't encounter so far.

Feedback on bugs and the usability of the script will help a lot!

Credits

I want to thank Benjol, I re-used some of his code from his Auto Comment script for my settings menu.

share|improve this question
add comment

You must log in to answer this question.

Browse other questions tagged .