I need to give the various solutions here some thought: [Wayback/Archive] Shortcut to open specific bookmark / URL in Chrome – Super User
–jeroen
Posted by jpluimers on 2023/06/12
I need to give the various solutions here some thought: [Wayback/Archive] Shortcut to open specific bookmark / URL in Chrome – Super User
–jeroen
Posted in Chrome, Firefox, Power User, Web Browsers | Leave a Comment »
Posted by jpluimers on 2023/06/09
The Bookmarklets posts have mostly reached past the front of the blog queue, so here goes a tweet from last year:
[Archive] Jeroen Wiert Pluimers on Twitter: “The past week, I learned a ton of HTML, JavaScript and (Shadow) DOM oddities while writing browser bookmarklets to speed up my blogging and @waybackmachine / @archiveis archiving. There is always an XKCD: «xkcd: Is It Worth the Time?» …” / Twitter
–jeroen
Posted in Bookmarklet, Fun, LifeHacker, Power User, Web Browsers, xkcd | Leave a Comment »
Posted by jpluimers on 2023/06/08
Many organisations train their personell with phishing attempts from domains that are different from the one the organisation uses.
The mantra is: only respond to emails (or clicking links in them) from domains you know.
Microsoft sent (still sends?) account expiration emails for various *.microsoft.com, *.visualstudio.com and other Microsoft domains like this:
[Wayback/Archive] 232840055-2ccfdb9b-2a13-4a34-92f5-f27f337825f8.png (766×653) email from
Microsoft account team <account-security-noreply@mail.msa.msidentity.com>
Posted in Pen Testing, Phishing, Power User, Red team, Security | Leave a Comment »
Posted by jpluimers on 2023/06/08
In Bookmarklets for Archive.is and the WayBack Machine to go to the original page, I wrote about how the Shadow DOM is used to prevent side effects between the code of the WayBack machine and the archived page.
In a similar manner, Bookmarklets can also interfere with code on the page and vice versa, for instance by using global variables.
That is why the [Wayback/Archive] A simple bookmarklet to tweet the current page – DEV Community is wrapped in a special kind of function:
javascript:(function(){ n=getSelection().anchorNode; t=n.nodeType===3?n.data:n.innerText;t='“'+t+'”\\n\\n'; window.open(`https://twitter.com/intent/tweet? text=${encodeURIComponent(t)}${document.location.href}`) })()
This is an [Wayback/Archive] IIFE – MDN Web Docs Glossary: Definitions of Web-related terms | MDN or “Immediately Invoked Function Expression”, a mechanism coined by [Archive] Ben Alman (@cowboy) / Twitter at [Wayback/Archive] Ben Alman » Immediately-Invoked Function Expression (IIFE).
Since the variables are inside the function body, they won’t interfere with the page. The body will be immediately executed.
Related:
–jeroen
Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »
Posted by jpluimers on 2023/06/07
Quite often, when browsing an archived page on Archive.is or the WayBack Machine, I want to check the current status of the original page.
So I wrote a few Bookmarklets.
Any Archive.is page has a Saved from field which is an input html element having a name attribute with value q and a value property containing the URL, which is navigated to by assigning the location in the above code.
So my goto Bookmarklet is this one:
javascript:open(document.getElementsByName("q")[0]?.value)
It uses [0]? as there is no getElementsByName, but there is [Wayback/Archive] Document.getElementsByName() – Web APIs | MDN as name values need not to be unique but id values have to be.
The above works on all types of Archive.is page types:
Saved from field.Saved from and Redirected from fields.Saved from and Redirected from, the fields Via and Original also are added.To get the additional fields from the other fields, we need to figure out a way to access them.
Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers | 1 Comment »
Posted by jpluimers on 2023/06/06
I write most of my documentation in Markdown or reStructuredText, so I don’t bump into html questions as often as in the past. But recently, I had to document in html as markdown was impossible, bumped in the choice between using div or p tags for paragraphs, and remembered there was a p problem not present with div but forgot which problem.
So I found [Wayback/Archive] What is the difference between <p>, <div> and <span> in HTML&XHTML? where the red bit explained what I forgot:
As others have answered…
divandpare “block elements” (now redefined as Flow Content) andspanis an “inline element” (Phrasing Content). Yes, you may change the default presentation of these elements, but there is a difference between “flow” versus “block”, and “phrasing” versus “inline”.An element classified as flow content can only be used where flow content is expected, and an element classified as phrasing content can be used where phrasing content is expected. Since all phrasing content is flow content, a phrasing element can also be used anywhere flow content is expected. [Wayback/Archive] The specs provide more detailed info.
All phrasing elements, such as
strongandem, can only contain other phrasing elements: you can’t put atableinside acitefor instance. Most flow content such asdivandlican contain all types of flow content (as well as phrasing content), but there are a few exceptions:p,pre, andthare examples of non-phrasing flow content (“block elements”) that can only contain phrasing content (“inline elements”). And of course there are the normal element restrictions such asdlandtableonly being allowed to contain certain elements.While both
divandpare non-phrasing flow content, thedivcan contain other flow content children (including moredivs andps). On the other hand,pmay only contain phrasing content children. That means you can’t put adivinside ap, even though both are non-phrasing flow elements.Now here’s the kicker. These semantic specifications are unrelated to how the element is displayed. Thus, if you have a
divinside aspan, you will get a validation error even if you havespan {display: block;}anddiv {display: inline;}in your CSS.
Thanks [Wayback/Archive] Dhamu for asking that question and [Wayback/Archive] chharvey for explaining these details!
The [Wayback/Archive] HTML Standard: 3.2.5.2 Kinds of content has a cool diagram too:
Posted in Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2023/06/05
Reminder to self GitLab pages on the gitlab.com are free, so Setting up a GitLab project so it is served over https as a gitlab.io and a custom subdomain comes with two caveats:
NET::ERR_CERT_COMMON_NAME_INVALID (Chrome) or SSL_ERROR_BAD_CERT_DOMAIN (Firefox):
5b0c885bd0e0a1a52ad5c29d for *.gitlab.io …” / Twitter
04298abcf6ea3edafad05e8099878118571c for … issued by CN = R3 O = Let's Encrypt C = US As Let’s Encrypt certificates should only refresh every slightly less than 90 days, I wonder why this mismatch happens. …” / Twitter–jeroen
Posted in Cloud, Development, GitLab, Infrastructure, Power User, Source Code Management | Leave a Comment »
Posted by jpluimers on 2023/06/02
If course you can configure Windows Optional Features using the GUI as for instance explained at [Wayback/Archive] How to manage Windows 10’s many ‘optional features | Windows Central.
However, I prefer command-line management.
About the only post doing the comparison of command-line mangement options I could find about is [Wayback/Archive] Different ways for installing Windows features on the command line – Peter Hahndorf and hopefully will be further updated in the future. It is dated 2015, but has been updated until at least Windows Server Nano.
I added one, and then rewrote the tool-set availability table in the post into this:
Posted in Communications Development, Development, Internet protocol suite, Microsoft Store, OpenSSH, Power User, SSH, TCP, Windows, Windows 10, Windows 11, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Vista | Leave a Comment »
Posted by jpluimers on 2023/06/01
Bumped into [Wayback/Archive] Microsoft account activity policy – Microsoft Support because an account that I hardly use was about to expire.
A few quotes (but be sure to read the most up to date policy):
- Except as provided below, you must sign in to your Microsoft account at least once in a two-year period to keep your account active. If you don’t sign in during this time, Microsoft will consider your account to be inactive.
- Exceptions: The activities below are exceptions that will result in Microsoft extending your account’s active status, even if you have not otherwise signed in to your Microsoft account within a two-year period.
- Purchases
- Subscriptions
- Publishing to the Microsoft Store
- Certifications
- Account Balance
- Accounts Payable
- Family Accounts
- Legal Requirements or as otherwise provided by Microsoft
Probably the easiest way at the time of writing is to make sure there is an account balance.
–jeroen
Posted in LifeHacker, Power User | Leave a Comment »
Posted by jpluimers on 2023/06/01
As Chrome mangles Bookmarklets to a partially escaped form (I think using Percent encoding), I first tried to document my Bookmarklets in Markdown so I could easier edit them and copy these JavaScript links to various browsers. That failed, because the html rendered from the Markdown didn’t contain the links any more. So I now use plain html for documenting them which is a pain to edit but works.
[Wayback/Archive] Some bookmarklets hosted as [Wayback/Archive] Some bookmarklets – cached 1 minute – throttled and [Wayback/Archive] Some bookmarklets – cached 1 year – CDN.
This is why:
Searches: [Wayback/Archive] markdown javascript in link – Google Search and [Wayback/Archive] “embed javascript” in markdown – Google Search.
–jeroen
Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »