Greasy Fork is available in English.

Vlamtweet

Replaces the Twitter "like" button with a tiny Vlambeer logo, effects included.

< Отзив за Vlamtweet

Отзив: ОК - скриптът работи, но има бъгове

§
Публикуван на: 04.11.2015

Slight modification

Script wasn't working for me so I changed the target conditions. Also added a more dramatic shake for tweets with lots of faves. Changed portion below:



document.body.addEventListener("click", function(e) {
if (!e.target.classList.contains("ProfileTweet-actionButton") || !e.target.classList.contains("js-actionFavorite")) return;
var shake = Math.max(8, 2*Math.floor(Math.log2(parseInt(e.target.getElementsByClassName("IconTextContainer")[0].getElementsByClassName("ProfileTweet-actionCount")[0].getAttribute("data-tweet-stat-count")))));
var shakeScale = shake/2;

§
Публикуван на: 04.11.2015

After a little more investigation data-tweet-stat-count isn't actually populated on your first click. after you favorite and unfavorite it'll be populated when you favorite again (which I didn't realize while testing initially). Changed to:

var shake = Math.max(8, 2*Math.floor(Math.log2(parseInt(e.target.getElementsByClassName("IconTextContainer")[0].getElementsByClassName("ProfileTweet-actionCount")[0].getElementsByClassName("ProfileTweet-actionCountForPresentation")[0].textContent))));

Публикувайте отговор

Влезте, за да публикувате отговор.