Trumpy2017!

Displays an icon next to users who frequently submit to or comment in /r/the_donald

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         Trumpy2017!
// @namespace    https://github.com/trumpy2017/trumpy17/
// @version      0.4.20181210
// @description  Displays an icon next to users who frequently submit to or comment in /r/the_donald
// @author       https://github.com/trumpy2017
// @include     http://www.reddit.com/*
// @include     https://www.reddit.com/*
// @grant        none
// @require     //code.jquery.com/jquery-2.2.4.min.js
// ==/UserScript==

(function() {
    'use strict';
    console.time("trumpy execution time");
var list = [];
var total = [];
    var trumpycount = 0
    var elmFoo = document.getElementsByClassName('author');
    var isThere = -1;
    for (var i = 0; i < elmFoo.length; i++){
        isThere = jQuery.inArray( elmFoo[i].innerHTML, list );
        if (isThere >= 0){
            trumpycount++;
            var commentcount = total[isThere];
            elmFoo[i].innerHTML = "TRUMPY!<img src=\"https://raw.githubusercontent.com/trumpyextension/trumpy/master/trump.gif\" title=\"" + commentcount + " comments\">" + elmFoo[i].innerHTML;
            isThere = -1;
        }
    }
    console.timeEnd("trumpy execution time");
    console.log("trumpy count: " + trumpycount);
})();