Skip to content

Instantly share code, notes, and snippets.

@hagino3000
Created September 21, 2011 04:20
Show Gist options
  • Save hagino3000/1231239 to your computer and use it in GitHub Desktop.
Save hagino3000/1231239 to your computer and use it in GitHub Desktop.
devquiz
(function() {
var cardsNum = document.querySelectorAll('.card').length;
for (var i=0; i<cardsNum; i++) {
for (var j=i+1; j<cardsNum; j++) {
flip(i);
flip(j);
}
}
function flip(idx) {
var card = document.getElementById('card'+idx);
var myEvent = document.createEvent('MouseEvents');
myEvent.initEvent('click', false, true);
card.dispatchEvent(myEvent);
}
})();
{
"name": "ChromeExtensionSolverHint",
"version": "1.0",
"description": "check dev quis card",
"content_scripts": [
{
"matches": [
"http://gdd-2011-quiz-japan.appspot.com/webgame/problem*"
],
"js": [
"cardfliper.js"
]
}
],
"permissions": [
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment