Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
This script was previously called "Insert APT Link" but has now been renamed. As such, you need to uninstall any previous versions before installing the new one.
Screenshot / Code Snippet
This UserScript adds some buttons to the editing toolbar that allow the following to easily be inserted:
This UserScript is fully compatible with inline editing and the toolbar buttons should show up anywhere there is a WMD editor.
You can install the script by clicking the link below:
Tested on Firefox 11 (and reported to work on Chrome too).
I can be reached at
2,27522 gold badges1515 silver badges3434 bronze badges
asked May 21, 2011 at 17:32
Nathan OsmanNathan Osman
23.3k1111 gold badges6060 silver badges107107 bronze badges
I've made some improvements:
- [bugfix] At some pages, the button would not be added: Tag wiki and pressing "Add another answer"
- [feature] selected text will now immediately be converted to an APT link
- [feature] URLs like
http://packages.ubuntu.com/package will now be converted to
package (technically, it takes the part after the last
- Code cleanup: stripping
http:// made no sense and was possibly a leftover from copying code directly
- 184.108.40.206 (13 June 2011): Release
- 220.127.116.11 (7 July 2011): [bugfix] the editors textareas for posts seems to have a numeric ID part now.
- 18.104.22.168 (7 July 2011): [bugfix] Edit Posts works now properly again
- 22.214.171.124 (18 January 2015): [bugfix] Apply to https://askubuntu.com/ too, fix API usage, jshint fixes, use new artwork and app URL.
answered Jun 13, 2011 at 12:53
53333 silver badges77 bronze badges
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged
livequery.jsin there. Would you mind leaving me a comment under our meta post whether this is OK or what I should change? Thanks.
StackExchange.MarkdownEditor.refreshAllPreviews()because they are documented nowhere. That's why I'm so glad you did the hard work and I only had to use it.