I made 3 scripts for myself.
The first one will bump your thread just by navigating to it. (If it's time to bump.)
Code:
// ==UserScript==
//@name AutoBump
//@namespace (you need an account to see links)
//@version 0.1
//@Description AutoBump your sales thread!
//@author Daviid
//@require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
//@Match (you need an account to see links)
//@grant none
// ==/UserScript==
(function() {
'use strict';
$(document).ready(function() {
var text = "";
try {
text = $(".nextbumpbox").textContent.trim();
} catch(err) {
text = $(".nextbumpbox")[0].textContent.trim();
}
if (text === undefined){
text = $(".nextbumpbox")[0].textContent;
console.log(text);
}
text = text.trim();
console.log(text);
if (text == "Next bump: Now") {
$("textarea[name='message_backup']").val('Next Bump: Now');
$("textarea[name='message']").val('Next Bump: Now');
$("#cke_contents_vB_Editor_QR_editor > textarea").val('Next Bump: Now');
$("#qr_submit").trigger("click");
}
});
})();
The second one will make the "Deal Url" a dropdown list with your threads.
Replace with your own links and names.
Code:
// ==UserScript==
//@name iTrader Select
//@namespace (you need an account to see links)
//@version 0.1
//@Description Select your thread from a list!
//@author Daviid
//@Match (you need an account to see links)
//@grant none
// ==/UserScript==
(function() {
'use strict';
var select = document.createElement("select");
var thread1 = document.createElement("option");
var thread2 = document.createElement("option");
var thread3 = document.createElement("option");
thread1.value = "http://clraik.com/forum/showthread.php?63395-Selling-Neocash-Items";
thread1.innerText = "NeoCash";
thread2.value = "http://clraik.com/forum/showthread.php?63383-✧-✩-✫-✬-Selling-Second-Best-Account-Around-✬-✫-✩-✧";
thread2.innerText = "Account";
thread3.value = "http://clraik.com/forum/showthread.php?63343-Daviid-s-Selling-Thread-(NP-and-Items)";
thread3.innerText = "NeoPoints";
select.name = "dealurl";
select.appendChild(thread1);
select.appendChild(thread2);
select.appendChild(thread3);
var input = document.getElementsByName("dealurl")[0].parentElement;
input.replaceChild(select,input.childNodes[3]);
})();
The third one will just highlight your threads so you can see them easily.
Code:
// ==UserScript==
//@name Own Thread Highlight
//@namespace (you need an account to see links)
//@version 0.1
//@Description Highlight your own threads.
//@author Daviid
//@Match (you need an account to see links)
//@grant none
// ==/UserScript==
(function() {
'use strict';
var username = document.getElementsByClassName("welcomelink")[0].textContent.split(", ")[1];
var myElements = document.querySelectorAll(".threadbit.dot");
for (var i = 0; i<myElements.length; i++) {
if (myElements[i].textContent.indexOf("Started by*"+username) > 0){
myElements[i].children[0].style.backgroundColor = "#ffd700";
myElements[i].children[0].children[1].style.backgroundColor = "#e4c104";
}
}
})();