Last active
December 11, 2016 17:43
-
-
Save hmbrg/b78a10b3e3ae3eb665657eaa95f44cdc to your computer and use it in GitHub Desktop.
Evernote H2 converter
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()%7B%24(%24(%22%23en-common-editor-iframe%22).contents()%5B0%5D).find(%22u%20b%2C%20b%20u%22).each(function(i)%20%7Bvar%20text%20%3D%20%24(this).text()%3Bvar%20parent%20%3D%20%24(this).parent()%3B%24(this).remove()%3Bparent.replaceWith(%22%3Ch2%3E%22%20%2B%20text%20%2B%20%22%3C%2Fh2%3E%22)%3B%7D)%7D)() |
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
| $($("#en-common-editor-iframe") | |
| .contents()[0]) | |
| .find("u b, b u") | |
| .each(function(i) { | |
| var text = $(this).text(); | |
| var parent = $(this).parent(); | |
| $(this).remove(); | |
| parent.replaceWith("<h2>" + text + "</h2>"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment