
another_mage |

Last year, I released a Greasemonkey script that would allow users of the browser Firefox to have keywords in messageboard posts automatically linked to d20pfsrd.com.
For example, if somebody writes Magic Missile in their forum post, the script will automatically create a link to Magic Missile.
I have now created a version of the script that is compatible with the browser Chrome.
Installation
In order to make use of this you need two things:
1. Chrome
2. another_mage's chrome_autolink script
http://pages.cs.wisc.edu/~meade/greasemonkey/chrome_autolink.user.js
After installing Chrome, click on the link to the script. Follow the prompts provided by Chrome to install the script. (Chrome will call it an Extension.)
Usage
Browse a thread on the messageboards. When you see words in green with an underline, you'll know the script has auto-linked to an article on that topic. Links always open in a new window/tab.
Notes
- Chrome includes the ability to run user scripts as a part of its functionality. Therefore installing an extension like Greasemonkey is not necessary for Chrome.
- Unlike Greasemonkey on Firefox, Chrome does not support cross-site requests. This means the topic map either has to be hosted by Paizo, or embedded directly into the script. Since I don't have access to Paizo's servers, the only option is to embed the topic map in the script.
- An embedded topic map is more secure; it is loaded from your computer, so it much more difficult to redirect the user to malicious links.
- An embedded topic map is less flexible; it will NOT automatically update with the latest content on d20pfsrd.com; the script must be re-released to update the topic map. (another_mage, or some other software developer would need to do this.)
- This script is running in the user's browser on their own computer. If you are not running the script, there will be absolutely no difference in your online experience. (The script always runs locally for those who install it, not on Paizo's computers.)
- I've given the script quite a workout while creating it, however, it may contain bugs. If it starts to adversely affect your online experience, click the wrench next to the address bar, select Tools -> Extensions from the menu, and click the "Disable" link to disable the script.
- This script is licensed under the GNU General Public License v3+. Generally, this means you are free to modify and share, as long as you share-alike. If you have any questions about the license terms, contact another_mage or check the GNU website.

jreyst |

Hey another_mage - I see that the links are pointing to "sites.google.com/..." would it be an easy fix to change that to the d20pfsrd.com base url instead? It's not ideal having people browsing from the back-end- some things may not work properly and it messes up some other stuff...

another_mage |

Hey another_mage - I see that the links are pointing to "sites.google.com/..." would it be an easy fix to change that to the d20pfsrd.com base url instead? It's not ideal having people browsing from the back-end- some things may not work properly and it messes up some other stuff...
Yep; that's not too hard of a fix. I pulled the spreadsheet from the Google docs link in order make the topic map. Did I fetch the wrong one? Or should I just replace the URL's prefix?

jreyst |

We use sites.google.com internally because Sites auto-updates links if/when we move pages around etc. when its done that way. Externally though we prefer if users browse via d20pfsrd.com. If you could still use the same spreadsheet but then auto-change the base url to d20pfsrd at time of use that'd be perfect :)

another_mage |

If you could still use the same spreadsheet but then auto-change the base url to d20pfsrd at time of use that'd be perfect :)
I fixed the embedded topic map in the Chrome version. Those who installed the old version will need to uninstall it and then reinstall the new version.
Uninstall
- Click the wrench icon next to the address bar.
- Select Tools -> Extensions from the menu
- Click the "Uninstall" link under the "chrome_autolink" extension
Install New Version
- Follow the same instructions as the first post in this thread.
Now on to fixing the Firefox/Greasemonkey version.