Last active
November 27, 2019 12:16
-
-
Save paulovitorbal/ed49b4f42822c6fe65c5d9e6ff2c47b0 to your computer and use it in GitHub Desktop.
Create simple list of cards to export from Fun Retro
This file contains hidden or 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
#this is supossed to be run on the console (tested only in google chrome) | |
function createListToExport(){ | |
var elements = angular.element("main").scope().messages.filter(function(element){ | |
return (element.type.id == 3) | |
}); | |
console.log(elements); | |
var my_div = document.createElement('textarea'); | |
my_div.id = 'export'; | |
document.getElementsByTagName('body')[0].append(my_div); | |
my_div.value = JSON.stringify(elements); | |
my_div.select(); | |
document.execCommand('copy'); | |
document.body.removeChild(my_div); | |
console.log('done'); | |
} | |
createListToExport(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment