Greasy Fork is available in English.

Vlamtweet

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

< Vlamtweet 피드백

리뷰: 보통 - 동작하나 버그 있음

§
작성: 2015-11-04

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;

§
작성: 2015-11-04

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))));

댓글 남기기

댓글을 남기려면 로그인하세요.