Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Das Referenz: Bookmarklet for iOS Safari to open current Wikipedia article in the Das Referenz app. More Info:
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') {'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