Last active
May 27, 2017 16:20
-
-
Save sldenazis/9b8ecba2ba5e8fdc3888132107c9a2b4 to your computer and use it in GitHub Desktop.
Greasemonkey's script for opr.ingress.com that allows you to select all the stars at once.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name selectallstars | |
// @namespace selectallstars | |
// @include https://opr.ingress.com/recon | |
// @version 0.2 | |
// @grant none | |
// ==/UserScript== | |
var newButtons = document.createElement('div'); | |
newButtons.innerHTML = ' \ | |
<div class="ngroup" style="position:absolute;top:60px"> \ | |
<button class="button-star" onclick="selectAll(2)"><span style="font-size:28px" class="glyphicon glyphicon-star-empty ingress-light-blue text-center"></span></button><br /> \ | |
<button class="button-star" onclick="selectAll(4)"><span style="font-size:28px" class="glyphicon glyphicon-star-empty ingress-light-blue text-center"></span></button><br /> \ | |
<button class="button-star" onclick="selectAll(6)"><span style="font-size:28px" class="glyphicon glyphicon-star-empty ingress-light-blue text-center"></span></button><br /> \ | |
<button class="button-star" onclick="selectAll(8)"><span style="font-size:28px" class="glyphicon glyphicon-star-empty ingress-light-blue text-center"></span></button><br /> \ | |
<button class="button-star" onclick="selectAll(10)"><span style="font-size:28px" class="glyphicon glyphicon-star-empty ingress-light-blue text-center"></span></button><br /> \ | |
</div> \ | |
'; | |
var newScript = document.createElement('script'); | |
newScript.innerHTML = ' \ | |
function selectAll(value){ \ | |
for ( var i = 0; i < document.getElementsByClassName("btn-group").length; i++ ) { \ | |
document.getElementsByClassName("btn-group")[i].childNodes[value].click() \ | |
}; \ | |
};'; | |
document.body.appendChild(newScript); | |
document.body.appendChild(newButtons); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It adds a vertical set of stars at the left of the page, that allows you to just click one of them for select all the others. Contributions and suggestions are welcomed :).
Agrega un grupo de estrellas vertical a la izquierda de la página, lo que te permite seleccionar todas las demas clickeando sólo una de ellas. Todos los aportes y sugerencias son bienvenidos :).