Last active
April 29, 2016 07:40
-
-
Save Slinkkay/9f0f67fac6d1fe45e325 to your computer and use it in GitHub Desktop.
Crashlytics User Scraper
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 Crashlytics ID Scraper | |
// @namespace http://your.homepage/ | |
// @version 0.1 | |
// @description A console logger which outputs the user name for each issue and then presses next | |
// @author You | |
// @match https://crashlytics.com/*/*/apps/*/issues/* | |
// @grant none | |
// ==/UserScript== | |
var input=document.createElement("input"); | |
input.type="button"; | |
input.value="Start Search"; | |
input.onclick = showAlert; | |
input.setAttribute("style", "font-size:18px;position:absolute;top:120px;right:40px;"); | |
document.body.appendChild(input); | |
var my_interval; | |
function stopSearch(some_interval){ | |
if (typeof some_interval == "undefined"){ | |
return; | |
} | |
input.value = "Start Search" | |
clearInterval(some_interval); | |
} | |
function showAlert() | |
{ | |
if (typeof my_interval == "undefined"){ | |
my_interval = setInterval(function(){ | |
try{ | |
var user_target = document.getElementsByClassName("ellipsis value"); | |
console.log(document.getElementsByClassName("ellipsis value")[0].innerHTML); | |
document.getElementsByClassName("icon-caret-left previous")[0].click(); | |
} catch (err){ | |
//console.log(err) | |
} | |
if (document.getElementsByClassName("disabled icon-caret-left previous").length == 1){ | |
stopSearch(my_interval); | |
my_interval = undefined; | |
} | |
}, 1000); | |
input.value = "Search Active" | |
} else { | |
stopSearch(my_interval) | |
my_interval = undefined; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment