Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-08-14 20:06:11, last edited by XxAtillaxX (2016-08-14 20:09:55)

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

reputation.js

// ==UserScript==
// @name        AutoRep
// @namespace   arf
// @description arf
// @include     /^https?://forums.everybodyedits\.com/.*$/
// @version     1
// @grant       GM_xmlhttpRequest
// @author      atillabyte
// ==/UserScript==
var users = [];

// examples

// negative reputation
// users.push({ pid: '601369', uid: '1381', poster: 'AnatolyEE', method: '2', message: 'homophobia' });

// positive reputation
// users.push({ pid: '601369', uid: '1381', poster: 'AnatolyEE', method: '1', message: 'an ok person' });

function autorep() {
  for (var i = 0; i < users.length; i++) {
    var user = users[i];
    var urlparam = 'http://forums.everybodyedits.com/reputation.php?&pid=' + user.pid + '&uid=' + user.uid + '&method=' + user.method;
    GM_xmlhttpRequest({
      method: 'POST',
      url: urlparam,
      data: 'form_sent=1&pid=' + user.pid + '&poster=' + user.poster + '&method=' + user.method + '&req_message=' + encodeURIComponent(user.message) + '&submit=Submit',
      headers: {
        'Host': 'forums.everybodyedits.com',
        'User-agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 Waterfox/47.0',
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
        'Accept-Language': 'en-US,en;q=0.5',
        'Referer': urlparam,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        'Cookie': document.cookie
      },
      onload: function (responseDetails) {
        if (responseDetails.responseText.contains('You must wait 300 minutes before you can give new voice.')) {
          console.log('Need to wait longer.');
        } else {
          console.log('Status ' + responseDetails.status +
          'Response:\n' + responseDetails.responseText);
        }
      }
    });
  }
}

window.addEventListener('load', function () {
  autorep();
}, false);

How-To:

Step 1. Install GreaseMonkey (Firefox) or TamperMonkey (Chrome).
Step 2. Click here.
Step 3. Edit the script, and add the correct arguments. (i.e. example).
Step 4. ???
Step 5. Profit.


signature.png
*u stinky*

Offline

Wooted by: (2)

#2 2016-08-14 20:13:34

Schlog
Member
Joined: 2015-07-21
Posts: 1,957

Re: reputation.js

i like this script

Offline

Schlog1471202014618961

Board footer

Powered by FluxBB

[ Started around 1732683132.0244 - Generated in 0.099 seconds, 12 queries executed - Memory usage: 1.38 MiB (Peak: 1.47 MiB) ]