0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

FF比の評価

Last updated at Posted at 2023-04-10

Twitterプロフページ表示 > デベロッパーツール表示 > コンソールに下記コピペ

// プロフからユーザー名取得
var currentUrl = window.location.href;
const username = currentUrl.split('/').pop();

// フォロー数取得
const followingCountElement = document.querySelector(`[href="/${username}/following"] span`);
const followingCount = followingCountElement.textContent.replace(',', '');
console.log(`フォロー数 ${followingCount}`);

// フォロワー数取得
const followersCountElement = document.querySelector(`[href="/${username}/followers"] span`);
const followersCount = followersCountElement.textContent.replace(',', '');
console.log(`フォロワー数 ${followersCount}`);

//FF比の評価値取得
const following1 = 1 + Number(followingCount);
const followers1 = 1 + Number(followersCount);
const followDivice = following1 / followers1;

const val1 = (followDivice * 3) - 1.8;
const val2 = Math.log10(Math.log10(followingCount));
const result = val1 * val2;
console.log(`FF比評価値 ${result}`);

//FF比の評価値取得についての説明
 if(result <= 0){
   console.log(`検索ででずらくないFF比`);
 }else if(0 < result && result <= 1.7){
   console.log(`0以上1.7以下は、検索で出ずらくなる範囲のFF比(値が大きいほど出ずらい)`);
 }else{
   console.log(`検索に出ずらいFF比(上限値)`);
 }

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?