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
| #!/usr/bin/env python3 | |
| """ | |
| Add every term from the WordPress Core handbook glossary to the macOS | |
| user spelling dictionary. | |
| Words are added through the system spell checker (NSSpellChecker), not by | |
| writing ~/Library/Spelling/LocalDictionary. Recent macOS versions keep | |
| learned words in a protected group container and ignore that file. | |
| Usage: |
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
| /* Expanded form of a bookmarklet for extracting rev=canonical OR tinyurling a page */ | |
| (function(){ | |
| var url=document.location; | |
| var links=document.getElementsByTagName('link'); | |
| var found=0; | |
| for(var i = 0, l; l = links[i]; i++) { | |
| if (l.getAttribute('rev') == 'canonical' || (/alternate short/).exec(l.getAttribute('rel'))) { | |
| found=l.getAttribute('href'); | |
| break; | |
| } |