this string has no description
cdn.js
1// ==UserScript==
2// @name Intercept img src
3// @match https://bsky.app/*
4// @match https://deer.social/*
5// @match https://witchsky.app/*
6// @run-at document-start
7// @grant none
8// ==/UserScript==
9
10(function () {
11 const FROM = 'cdn.bsky.app';
12 const TO = 'cdn.blueat.net';
13
14 const desc = Object.getOwnPropertyDescriptor(
15 HTMLImageElement.prototype,
16 'src'
17 );
18
19 Object.defineProperty(HTMLImageElement.prototype, 'src', {
20 set(value) {
21 if (typeof value === 'string' && value.includes(FROM)) {
22 value = value.replaceAll(FROM, TO);
23 }
24 return desc.set.call(this, value);
25 },
26 get: desc.get,
27 configurable: true,
28 enumerable: true
29 });
30})();