Open in Edmund bookmarklet to support custom domains

Many of the sites at Wikidot that I use have a custom domain, yet currently the bookmarklet doesn't support these sites. I'm adding this wish so that it's entered into the tracker for future reference.

Potential ways for this to be implemented:

Option 1: Wikidot adds the wiki subdomain to the HTML header, in the same way that other information is added. I assume that this could then be easily detected using a "bookmarklet"?

Option 2: Register your own site beforehand somewhere else, posting the custom domain and the actual Wikidot URL. The bookmarklet would then check this list so that it knows which site to access with the API.

If it ends up being Option 2, I would hope that the site is generic enough to be used by other applications (e.g. STE). An "Open in STE" bookmarklet for that application has been a long-standing wish, but hasn't been possible until recently.

Discussion - 2 comments

Anonymousbcammo 21 Jul 2011 00:15

I'm not sure if option 2 is possible with a bookmarklet. I'll have to look into it. In the meantime, I've worked out a way to manually add support for custom domains - you'll just need to add your domains to the bookmarklet. Below, replace with your custom domain, and osx with the corresponding wikidot site name. Additional sites can be added in the 'else if' blocks. Then copy the code to the source of the 'Open in Edmund' bookmarklet.

javascript: domain =^(.*?)\.wikidot\.com$/);
if ( == '') {
     domain = ['','osx'];  
else if ( = '') {
     domain = ['','shane'];   
if (domain) {
    unix =;
    window.location = '' + domain[1] + '&page=' + unix;
} else {
    alert('Custom domains are not yet supported.');


Anonymousleiger 21 Jul 2011 00:25

Ah, good solution - thanks!


Add a new comment