Re: Open in Edmund bookmarklet to support custom domains

Post Preview

postName: ''
postComment: "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 roaringapps.com 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.\n[[code type=\"javascript\"]]\njavascript: domain = WIKIREQUEST.info.domain.match(/^(.*?)\\.wikidot\\.com$/);\nif (window.location.host == 'roaringapps.com') {\n domain = ['','osx']; \n}\nelse if (window.location.host = 'shane-smith.com') {\n domain = ['','shane']; \n}\nif (domain) {\n unix = WIKIREQUEST.info.pageUnixName;\n window.location = 'https://css3.wdfiles.com/edmund/code/1#?site=' + domain[1] + '&page=' + unix;\n} else {\n alert('Custom domains are not yet supported.');\n}\n[[/code]]"

rating: 0+x
This is the Redirect module that redirects the browser directly to the "http://snippets.wdfiles.com/local--code/code:url-title-with-slash-redirect/2#http://edmund.wikidot.com/feedback:5" page.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License