The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for August 8th, 2024

Newer WordPress bookmarklets for navigating from a blog post to the classic editor, or getting the canonical url anchor of a blog post

Posted by jpluimers on 2024/08/08

Last year I posted about Some JavaScript bookmarklets for WordPress published pages centered around navigation and IDs.

It depended on HighlanderComments to exist in order for getting its .connectURL which contains the canonical blog post URL (i.e. from https://wiert.me it obtains https://wiert.wordpress.com).

Nowadays HighlanderComments does not always exist, but in that case <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://wiert.wordpress.com/xmlrpc.php?rsd"> does exist.

Its’ href value can be obtained by querying document.querySelector('link[rel="EditURI"]').href and truncate it, so I made some conditional code that first tries the HighlanderComments and defers code obtaining it from the link element I mentioned above.

I also added proper Bookmarklet wrappers so the function results don’t leak to the console or Browser (Firefox really does not like Bookmarklets without this wrapper).

javascript:(function(){
//Statements returning a non-undefined type, e.g. assignments
})();

Firefox also dislikes pasting code into the development console.

Code:

Read the rest of this entry »

Posted in Bookmarklet, Chrome, Development, Firefox, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »

The regexp for an emoticon ?

Posted by jpluimers on 2024/08/08

I responded to [Wayback/Archive] jilles.com on Twitter: “@0xD4ni @Twitter What is the regexp for an emoticon ?” with [Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “@jilles_com @0xD4ni @Twitter \p{So}+ See …”.

I got the answer from [Wayback/Archive] java – What is the regex to extract all the emojis from a string? – Stack Overflow (thanks [Wayback/Archive] vishalaksh, and [Wayback/Archive] Desgard_Duan) which refers to the quoted section below.

Note that correctly matching highly depends on the versions of the libraries you use: there have been lots of releases of Unicode versions over the last years (since 2014 roughly every 12 months) each usually adding more Emoji.

In addition, many Emoji are not single Unicode codepoints: often they are code points (with or without any of the variation selectors) stacked on top of each other with zero-width joiners like I described in Kris on Twitter: “Company chat: »Right, we need more languages with Emoji as variable type indicators and pointer symbols.«….

I tried fiddling on [Wayback/Archive] regex101: build, test, and debug regex and could not always getting it to work as I hoped for, but also could not figure out how recent their libraries are.

Read the rest of this entry »

Posted in Conference Topics, Conferences, Development, Emoticons, Encoding, Event, Geeky, RegEx, Software Development, Unicode | Leave a Comment »

ICANN approves use of .internal domain for your network • The Register

Posted by jpluimers on 2024/08/08

–jeroen

Posted in Uncategorized | Leave a Comment »