Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 1. make a blank chrome extension and insert the following content script.
- // 2. go to https://scrap.tf/raffles and let the extension sign you up for all them raffles.
- $(function() {
- if (document.location == "https://scrap.tf/raffles") {
- var interval = 900;
- var scrollfunc = function(){window.scrollTo(0,document.body.scrollHeight);};
- var searchfunc = function(){
- var raffs = document.body.innerHTML.match(/\/raffles\/[A-Z0-9]{6}/g);
- for (var i = 0; i < raffs.length; i++) {
- raffid = raffs[i].match(/[A-Z0-9]{6}/);
- if ($("#raffle-box-" + raffid).css("opacity") == 1) {
- var script = document.createElement("script");
- script.type = "text/javascript";
- script.text = "ScrapTF.Raffles.EnterRaffle('" + raffid + "');";
- console.log(script.text);
- var rafframe = document.createElement("iframe");
- rafframe.src = "/raffles/" + raffid;
- rafframe.onload = function(){
- rafframe.appendChild(script);
- };
- document.body.appendChild(rafframe);
- document.getElementById("raffle-box-" + raffid).setAttribute("style", "opacity: .2;");
- return
- }
- }};
- setInterval(scrollfunc, interval);
- setInterval(searchfunc, interval);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement