HF Poll Counter

Counts polls properly when they are public (or mod of the section)

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name   HF Poll Counter
// @namespace  Xerotic
// @description  Counts polls properly when they are public (or mod of the section)
// @require   http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
// @include   **hackforums.net/polls.php**
// @run-at    document-end
// @version   1.1
// ==/UserScript==

var total_count = 0;

$('.quick_keys').first().find('tr').each(function() {
 if(!$(this).children().first().hasClass('thread')) {
  if($(this).children().first().hasClass('tfoot')) {
   $(this).children().first().next().html('<strong>' + total_count + ' votes</strong>');
  } else {
   $(this).children().first().next().next().html($(this).children().first().next().find('a').length);
   total_count += parseInt($(this).children().first().next().find('a').length);
  }
 }
});