Skip to content

Instantly share code, notes, and snippets.

@benjamingeiger
Created August 4, 2011 06:27
Show Gist options
  • Save benjamingeiger/1124599 to your computer and use it in GitHub Desktop.
Save benjamingeiger/1124599 to your computer and use it in GitHub Desktop.
Chrome plugin options page - can't find "restore_blocklist()"
<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