mirror of
https://github.com/NohamR/safari-internal-js.git
synced 2026-11-25 15:39:48 +00:00
Add 27.0 js src
This commit is contained in:
1 parent
c768a1667c
commit
897293bc5f
39 files changed
+24598
-1
No files matched your search
@@ -0,0 +1,38 @@
|
||||
//# sourceURL=__InjectedScript_ReaderSharedUINormalWorld.js
|
||||
/* Copyright (c) 2026 Apple Inc. All rights reserved. */
|
||||
function loadTwitterJavaScript() {
|
||||
window.twttr ||
|
||||
(window.twttr = (function (e, t, r) {
|
||||
var i,
|
||||
a,
|
||||
d = e.getElementsByTagName(t)[0];
|
||||
if (!e.getElementById(r))
|
||||
return (
|
||||
((a = e.createElement(t)).id = r),
|
||||
(a.src = "https://platform.twitter.com/widgets.js"),
|
||||
d.parentNode.insertBefore(a, d),
|
||||
window.twttr ||
|
||||
(i = {
|
||||
_e: [],
|
||||
ready: function (e) {
|
||||
i._e.push(e);
|
||||
},
|
||||
})
|
||||
);
|
||||
})(document, "script", "twitter-wjs"));
|
||||
}
|
||||
function richTweetWasCreatedFromSimpleTweet(e) {
|
||||
e.parentNode.querySelector(".simple-tweet").classList.add("hidden");
|
||||
}
|
||||
function replaceSimpleTweetsWithRichTweets(e) {
|
||||
let t = document.querySelectorAll("[data-reader-tweet-id]");
|
||||
t.length &&
|
||||
(loadTwitterJavaScript(),
|
||||
twttr.ready(function (r) {
|
||||
for (let i of t)
|
||||
r.widgets
|
||||
.createTweet(i.getAttribute("data-reader-tweet-id"), i, e)
|
||||
.then(richTweetWasCreatedFromSimpleTweet);
|
||||
}));
|
||||
}
|
||||
0;
|
||||
Reference in new issue
Block a user