Skip to content

Instantly share code, notes, and snippets.

@R4356th
R4356th / redirector.js
Last active October 7, 2025 11:32
JavaScript code to enforce https on your websites
/* Copyright 2020-25 Radman Siddiki
Licensed under the MIT License (https://www.mit.edu/~amini/LICENSE.md) */
if (location.protocol === "http:") {
location.replace(location.href.replace("http:", "https:"));
}
@cure53
cure53 / scriptlet.md
Last active August 23, 2025 07:29
The Scriptless Scriptlet - Or how to execute JavaScript from CSS in MSIE11 without using Scripts

The Scriptless Scriptlet

Or how to execute JavaScript from CSS in MSIE11 without using Scripts

Stop! This text is only interesting for you if you...

  • Like popping alerts in weird situations
  • Miss CSS expressions as much as we do
  • Have an unhealthy obsession for markup porn

Introduction