Last active
October 15, 2015 22:43
-
-
Save Raureif/11169787 to your computer and use it in GitHub Desktop.
Das Referenz: Bookmarklet for iOS Safari to open current Wikipedia article in the Das Referenz app. More Info: http://dasReferenz.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var hostnameComponents = (window.location.hostname).split('.');var pathnameComponents = (window.location.pathname).split('/');if (hostnameComponents[1] == "m") {var lang = hostnameComponents[0];var domain = hostnameComponents[2];var article = pathnameComponents[2];} else {var lang = hostnameComponents[0];var domain = hostnameComponents[1];var article = pathnameComponents[2];}if (lang !== '' && article !== '' && domain === 'wikipedia') {window.open('dasReferenz://' + lang + '/' + article);} else {alert ('This does not seem to be a Wikipedia page you\'re currently looking at.');}})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment