Created
August 8, 2017 15:30
-
-
Save moonhouse/14a1de3d6a7e9b9f6b0aaa0272eaebea to your computer and use it in GitHub Desktop.
Bookmarklet för att skapa <ref>{{Tidningsref… för arkivsidor från Svenska Dagbladet att använda i svenskspråkiga Wikipedia.
This file contains hidden or 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 p = document.createElement('a'); | |
| p.href = location.href; | |
| var u = p.pathname.split('/'); | |
| var t = new Date(); | |
| var i = t.getFullYear().toString() + "-" + (t.getMonth() > 8 ? '' : '0') + (t.getMonth() + 1).toString() + "-" + (t.getDate() > 9 ? '' : '0') + t.getDate().toString(); | |
| prompt("Ref", "<ref>{{Tidningsref |författare= |rubrik= |url=" + location.href + " |tidning=Svenska Dagbladet |datum=" + u[2] + " |sid=" + u[3] + " |hämtdatum=" + i + " }}</ref>"); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment