Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (37 sloc) 1.15 KB
<!-- for option page -->
<head><title>Chrome Couch Extension Options</title></head>
<script type="text/javascript">
// Saves options to localStorage.
function save_options() {
var couch = document.getElementById("preferred_couchdb").value;
localStorage["preferred_couchdb"] = couch;
// Update status to let user know options were saved.
var status = document.getElementById("status");
status.innerHTML = "Options Saved.";
setTimeout(function() {
status.innerHTML = "";
}, 750);
// Restores select box state to saved value from localStorage.
function restore_options() {
var favorite = localStorage["preferred_couchdb"];
if (!favorite)
document.getElementById("preferred_couchdb").value = "localhost:5984";
document.getElementById("preferred_couchdb").value = favorite;
<body onload="restore_options()">
<strong>TODO: Wire up option page to make changes in the couchdb?</strong><br/>
Preferred CouchDB
<input id="preferred_couchdb" type="text"/>
<button onclick="save_options()">Save</button>
<div id="status"></div>
Jump to Line
Something went wrong with that request. Please try again.