Created
August 4, 2011 06:27
-
-
Save benjamingeiger/1124599 to your computer and use it in GitHub Desktop.
Chrome plugin options page - can't find "restore_blocklist()"
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
<html> | |
<head> | |
<title>Porcupine Options</title> | |
</head> | |
<script src="jquery.js" type="text/javascript" /> | |
<script type="text/javascript"> | |
function restore_blocklist() { | |
//var blocklist = localStorage["porcupine-blocklist"]; | |
var blocklist = [ "foo", "bar", "baz" ]; | |
$("#foo").css("background-color", "red"); | |
for (username in blocklist) { | |
$("table#blocked-usernames").append("<tr><td>" + username + "</td><td><a href=\"javascript:remove_block(" + username + ")\">[remove]</a></td></tr>"); | |
} | |
} | |
$(document).ready(restore_blocklist); | |
</script> | |
<body> | |
<h1 id="foo">Porcupine!</h1> | |
<table id="blocked-usernames"> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment