Skip to content

Instantly share code, notes, and snippets.

@abrahammurciano
Last active May 20, 2020 08:18
Show Gist options
  • Save abrahammurciano/1e9f608d2b47c7f5700bc23a28477e4b to your computer and use it in GitHub Desktop.
Save abrahammurciano/1e9f608d2b47c7f5700bc23a28477e4b to your computer and use it in GitHub Desktop.
Execute Order 66 on Rotten Tomatoes Summer Movie Showdown of 2020. Run this script on their site https://editorial.rottentomatoes.com/article/summer-movie-showdown/ to keep voting for Star Wars! Good Soldiers Follow Orders!
if(typeof jQuery=='undefined') {
var headTag = document.getElementsByTagName("head")[0];
var jqTag = document.createElement('script');
jqTag.type = 'text/javascript';
jqTag.src = '//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js';
jqTag.onload = execute;
headTag.appendChild(jqTag);
} else {
execute()
}
function execute() {
$(function() {
show_vote_stats();
order_66();
});
}
function twenty_thousand_clones() {
$.ajax({
type: 'GET',
url: 'https://kvdb.io/X67jXW911KPmn9tqrPpuqP/kvdb.io/Fd55uogXyxYdnXJvnyN8Xo/clones',
success: function(data) {
document.title = 'CT-' + data + ' executing order 66';
$('h1 strong span[style="color: #ff0000;"]').append('out of ' + parseInt(data).toLocaleString('en') + '. <br> FOR THE REPUBLIC!');
}
});
}
function a_million_more_on_the_way() {
$.ajax({
type: 'PATCH',
url: 'https://kvdb.io/X67jXW911KPmn9tqrPpuqP/kvdb.io/Fd55uogXyxYdnXJvnyN8Xo/clones',
data: '+1'
});
}
function show_vote_stats() {
title = $('h1 strong span[style="color: #ff0000;"]');
title.text("");
twenty_thousand_clones();
a_million_more_on_the_way();
var vote_count = getCookie('vote_count');
if (vote_count === '') {
vote_count = 1;
} else {
vote_count++;
}
setCookie('vote_count', vote_count, 10);
title.prepend('You have contributed ' + vote_count.toLocaleString() + ' Star Wars votes ');
}
function order_66() {
var iframe = get_iframe();
if (iframe === null) return;
iframe.ready(function() {
var contents = iframe.contents();
set_titles(contents);
i_love_democracy(contents);
});
}
function get_iframe() {
var iframe = $('iframe[data-id="1e924cad-7563-4198-9626-ad8a0f12615f"]');
if (iframe.length === 0) {
setTimeout(order_66, 100);
return null;
}
return iframe;
}
function set_titles(e) {
var titles = e.find('.section-title p');
if (titles.length === 0) {
setTimeout(order_66, 100);
return;
}
titles.text('Good Soldiers Follow Orders');
}
function i_love_democracy(e) {
var containers = e.find('.poll-answer-container');
containers.each(function() {
var movie = '';
if ($(this).is(':contains("Star Wars")')) {
movie = 'Star Wars';
} else if ($(this).is(':contains("Return of the Jedi")')) {
movie = 'Return of the Jedi';
} else if ($(this).is(':contains("The Empire Strikes Back")')) {
movie = 'The Empire Strikes Back';
} else if ($(this).is(':contains("Revenge of the Sith")')) {
movie = 'Revenge of the Sith';
}
if (movie !== '') {
dew_it($(this).find('button'), movie);
}
});
}
voted = {
'Star Wars': false,
'Return of the Jedi': false,
'The Empire Strikes Back': false,
'Revenge of the Sith': false
}
function dew_it(button, movie) {
setTimeout(function () {
if (!button.hasClass('selected')) {
button.trigger('click');
dew_it(button, movie);
} else {
voted[movie] = true;
if (voted['Star Wars'] && voted['Return of the Jedi'] && voted['The Empire Strikes Back'] && voted['Revenge of the Sith']) {
the_circle_is_now_complete();
}
}
},100);
}
function the_circle_is_now_complete() {
localStorage.clear();
setTimeout(function() {
location.reload();
}, 10000);
}
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) === 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
@abrahammurciano
Copy link
Author

abrahammurciano commented May 19, 2020

The Captcha has basically stopped mine from working altogether, we may well be defeated

You just need to do the captchas and then reload the page. It should continue working for a while. Also, I just updated the code to deal with the captchas as best I can, so when you get a captcha, do it (do the one that is focused first). Once they're all done the page should refresh itself and continue voting. If it doesn't, just reload it yourself

@abrahammurciano
Copy link
Author

How can I verify weather or not it is working?

If the page is reloading itself, then it should be working.

@That-one-guy66
Copy link

Good soldiers follow orders sir.

@stanlrt
Copy link

stanlrt commented May 19, 2020

It will be done, my Lord

@stanlrt
Copy link

stanlrt commented May 19, 2020

How can I verify weather or not it is working?

The tab title should be different

@stanlrt
Copy link

stanlrt commented May 19, 2020

My Lord! Darth Tomatoes has added CAPTCHAS !!!

@elitealexplays
Copy link

make a script that looks like its voting for the other movies and not starwars but in reality its a trick so more people vote for us without realising

@bruhm0m3ntum
Copy link

How can I get it to work? The title isn't changing and the page isn't refreshing itself. There are no errors showing and when I tried something myself, adding "function start(){" to the beginning but that caused an error message on the final line.

@monikasnerdygirlfriend
Copy link

The counter has overflowed

@motanveer
Copy link

I wrote some Python code using selenium, but Captchas are problem.

Hoping this works. Good soldiers follow orders.

@elitealexplays
Copy link

How can I get it to work? The title isn't changing and the page isn't refreshing itself. There are no errors showing and when I tried something myself, adding "function start(){" to the beginning but that caused an error message on the final line.

make sure you use this aplication https://chrome.google.com/webstore/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld

@bruhm0m3ntum
Copy link

bruhm0m3ntum commented May 19, 2020

@motanveer
Copy link

I'm manually solving the Captchas, but now it's on every reload.

This effort may no longer be profitable :(

@icycheesecake
Copy link

I'm manually solving the Captchas, but now it's on every reload.

This effort may no longer be profitable :(

I have an auto refresh extension running atm with multiple machines proxied from different uk nord servers and appear to be doing decently

@elitealexplays
Copy link

I'm manually solving the Captchas, but now it's on every reload.

This effort may no longer be profitable :(

mine is glitched, i only have to reload the page for one reason

@motanveer
Copy link

Update:

Rotating VPNs is the way to go, avoiding Captchas this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment