So long t.co
This commit is contained in:
parent
8dc3589f02
commit
5c9ff2c02c
|
@ -0,0 +1,20 @@
|
||||||
|
// go directly to links, bypassing t.co
|
||||||
|
(function() {
|
||||||
|
$("a[data-expanded-url]").each((i, el) => {
|
||||||
|
el = $(el);
|
||||||
|
el.attr("href", el.attr("data-expanded-url"));
|
||||||
|
});
|
||||||
|
$("ol.stream-items").each((i, list) => {
|
||||||
|
let observer = new MutationObserver((mutations) => {
|
||||||
|
mutations.forEach((mutation) => {
|
||||||
|
mutation.addedNodes.forEach((it) => {
|
||||||
|
$(it).find("a[data-expanded-url]").each((i, el) => {
|
||||||
|
el = $(el);
|
||||||
|
el.attr("href", el.attr("data-expanded-url"));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
observer.observe(list, { childList: true });
|
||||||
|
})
|
||||||
|
})();
|
|
@ -0,0 +1,21 @@
|
||||||
|
// go directly to links, bypassing t.co
|
||||||
|
(function() {
|
||||||
|
$("a[data-full-url]").each((i, el) => {
|
||||||
|
el = $(el);
|
||||||
|
el.attr("href", el.attr("data-full-url"));
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".js-chirp-container").each((i, container) => {
|
||||||
|
let observer = new MutationObserver((mutations) => {
|
||||||
|
mutations.forEach((mutation) => {
|
||||||
|
mutation.addedNodes.forEach((it) => {
|
||||||
|
$(it).find("a[data-full-url]").each((i, el) => {
|
||||||
|
el = $(el);
|
||||||
|
el.attr("href", el.attr("data-full-url"));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
observer.observe(container, { childList: true });
|
||||||
|
});
|
||||||
|
})();
|
Loading…
Reference in New Issue