Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Userscript 

[MarketPlace] Deal Disputes + Rep Count + Trust Scan in Postbit

I've been pmed that Userscripts has had a lot of downtime recently.

Here's the script:
PHP Code

<?php 
// ==UserScript==
// @name      Deal Dispute on Postbit
// @namespace  http://codeinstitution.net/DealDisputePostbit
// @version    1.0
// @description  Deal Disputes will be shown on postbit
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @include     *hackforums.net/*
// @copyright  2014+, Saad T (King of Hearts)
// ==/UserScript==

URL = window.location.href;
if(
URL.indexOf("hackforums.net/showthread.php") > -1){    
    var 
x = document.querySelectorAll('.navigation > a');
    if(
x[1].innerHTML == "Marketplace"){
      
injectjs();
      
posts = $("#posts").find("td[class='post_author']");
      
authorInfo = $("#posts").find("td[class='smalltext post_author_info']");
      var 
l = posts.length;
      for(var 
i = 0; i < l; i++){
      
username = $(posts[i]).find(".largetext");
      var 
res = username[0].innerHTML.match(/<a href="(.*)"><span class="(.*)">(.*)<\/span>/);
      
usernameN = res[3];
      
authorInfo[i].innerHTML += '<br /><div id="dealdispute'+i+'"><a href="javascript:void(0)" onclick="document.getElementById(\'dealdispute'+i+'\').innerHTML = getScams(\''+usernameN+'\');">Check for Deal Disputes</a>';//getScams(usernameN);
      
}
    }
}else if(
URL.indexOf("hackforums.net/disputedb.php?user=") > -1){
  var 
user = URL.split("?user=")[1];
  
document.body.outerHTML = /<body.*?>([\s\S]*)<\/body>/.exec(getScams(user))[1];

}

function getScams(user){
    var data = null;
    $.ajax({
      type: "POST",
      async: false,
      url: "disputedb.php",
      data: {
      username:user,
            action: "do_search",
            submit: "search",
            my_post_key:document.documentElement.innerHTML.split('my_post_key = "')[1].split('";')[0]
      }}
      ).done(function( dataR ) {
      data = dataR;
      });
  return data;
}
function injectjs() {
    $('<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" />"<script type="text/javascript">'+ 'function getScams(user){var data = null;    $.ajax({      type: "POST",      async: false,      url: "disputedb.php",      data: {      username:user,            action: "do_search",            submit: "search",            my_post_key:document.documentElement.innerHTML.split("my_post_key = \\"")[1].split("\\";")[0]      }}).done(function(dataR) {      data = dataR;      }); if(data.indexOf("No Results") > -1){return "Deal Disputes: <span style=\\"color:green\\">None</span>";}else{tds = $(data).find(\'table:eq(1)\').find(\'td\');var count = 0;      for(var i = 5; i < tds.length; i+=5){      if($(tds).eq(i + 5).text() == "Open" &&$(tds).eq(i + 3).text() == user){            count++;      }      }if(count == 0){return "Deal Disputes: <span style=\\"color:green\\">None</span>";}else {return "Deal Disputes: <span style=\\"color:red\\"><a href=\\"/disputedb.php?user="+user+"\\">"+count + "</a></span>";}}}' +'</script>').appendTo($('head')); 
} 
Great tool by this fellow member. Thanks for the share.
That is actually pretty great :)

Keep up the good work buddy :)
Nice userscript! This might come in handy when I do Marketplace things.
Hey



(May 22, 2014 12:54 PM)xadamxk Wrote:  Any progress on this implementation?

So a year and a bit over I found this userscript on my old laptop. Anyways, I've decided to update it a bit.

I've made the following changes:

Quote:This script now also checks a users reputation and tells you how many negative and neutral feedbacks the user has (amount not value). It also searches the first page of the feedback and looks for words such as 'scam, shady, lier, caution' and lets you know if those are mentioned. Last but not least, a trust scan link is placed for ease of access.


I've also reuploaded it here: https://greasyfork.org/en/scripts/11359-...on-postbit

Please let me know of any bugs and such.

Thanks,
KoH
(Aug 2, 2015 05:20 PM)xadamxk Wrote:  How have I never seen this script before? xD
It's pretty cool.

You have, look at the second post above yours :P

I just grave dug and updated it.🤝
This userscript is literally gold. Great job!

Edit: But the link in the OP is broken.
(Aug 3, 2015 03:23 PM)Hash G. Wrote:  This userscript is literally gold. Great job!

Edit: But the link in the OP is broken.

Link seems to be fine for me...Here you go: https://greasyfork.org/en/scripts/11359-...on-postbit

Thanks,
KoH
This looks awesome, will be using it from now on. Thank you!
(Jul 23, 2022 12:45 PM)Cuthbert Wrote:  You haven't addressed a single argument without resorting to sophistry and satire. Blaspheming the Lord is sending you straight to Hell and if you get intoxicated with marijuana you're most likely going to suffer even more in Hell.
(Aug 31, 2015 10:47 AM)Eternal. Wrote:  This looks awesome, will be using it from now on. Thank you!

I'm glad you've found this useful.

If there's anything I should add, let me know.
I'd like to bring this back up.

Please use this userscript, it helps. Also, the new servers should make the requests even faster.
From the new scammer reps rule implementation, this wouldn't be difficult? I mean no one can leave a "SCAMMER" feedback just that way.
Shit this is just going to make people afraid to deal with me.
Posting to find this later
Good job OP. Will definitely try it. Hope it makes the marketplace cleaner.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Userscript] by Hash G.Dec 16, 2016 08:18 PM 43 3,204 Dec 16, 2016 08:18 PM
Last Post: phunted
[Userscript] by ⁠CammyMar 21, 2016 02:21 AM 29 1,158 Mar 21, 2016 02:21 AM
Last Post: ⁠Cammy
by LiveMChiefDec 10, 2013 09:38 PM 4 147 Dec 10, 2013 09:38 PM
Last Post: archangel.dmitry