dotfiles/.js/com/twitter/tweetdeck.js

21 lines
558 B
JavaScript
Raw Normal View History

2016-09-10 19:41:14 +00:00
// 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 });
});
})();