Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed whitespace and git config

  • Loading branch information...
commit d6700c412f0d9e62478d70e1ed6170074db12434 1 parent 3aef582
Matthias authored
Showing with 58 additions and 58 deletions.
  1. +1 −1  background.js
  2. +57 −57 options.html
View
2  background.js
@@ -34,7 +34,7 @@ function getPrefix(){
}
function getApiKey(){
- return "eb7dmX46Taf23C2c57A2e87t0lg0Q529"
+ return "237dflebT02f3E5855ANq19D97g8Fb14"
}
function validate(){
View
114 options.html
@@ -1,70 +1,70 @@
<html>
<head><title>rilctx</title>
- <script type="text/javascript" src="background.js"></script>
- <script type="text/javascript">
+ <script type="text/javascript" src="background.js"></script>
+ <script type="text/javascript">
- var infoTimeout = null;
-
- // Saves User credentials to localStorage
- function save_options() {
- var username = document.getElementById("username").value;
- var password = document.getElementById("password").value;
- var shownotifications = document.getElementById("shownotifications").checked;
+ var infoTimeout = null;
+
+ // Saves User credentials to localStorage
+ function save_options() {
+ var username = document.getElementById("username").value;
+ var password = document.getElementById("password").value;
+ var shownotifications = document.getElementById("shownotifications").checked;
- localStorage["username"] = username;
- localStorage["password"] = password;
- localStorage["shownotifications"] = shownotifications;
+ localStorage["username"] = username;
+ localStorage["password"] = password;
+ localStorage["shownotifications"] = shownotifications;
- // Update status to let user know options were saved.
- var status = document.getElementById("status");
- status.innerHTML = "Options Saved.";
- infoTimeout = setTimeout(function () {
- status.innerHTML = "";
- }, 750);
- validateCredentials();
- }
+ // Update status to let user know options were saved.
+ var status = document.getElementById("status");
+ status.innerHTML = "Options Saved.";
+ infoTimeout = setTimeout(function () {
+ status.innerHTML = "";
+ }, 750);
+ validateCredentials();
+ }
- // Restores select box state to saved value from localStorage.
- function restore_options() {
- var username = localStorage["username"];
- if (username) {
- document.getElementById("username").value = username;
- }
- var password = localStorage["password"];
- if (password) {
- document.getElementById("password").value = password;
- }
- var shownotifications = localStorage["shownotifications"] !== "false";
- document.getElementById("shownotifications").checked = shownotifications;
- }
+ // Restores select box state to saved value from localStorage.
+ function restore_options() {
+ var username = localStorage["username"];
+ if (username) {
+ document.getElementById("username").value = username;
+ }
+ var password = localStorage["password"];
+ if (password) {
+ document.getElementById("password").value = password;
+ }
+ var shownotifications = localStorage["shownotifications"] !== "false";
+ document.getElementById("shownotifications").checked = shownotifications;
+ }
- // Checks credentials with Pocket (ril)
- function validateCredentials() {
- var apiurl = getBaseURL("auth");
- var params = getPrefix() + "&apikey=" + getApiKey();
- var request = new XMLHttpRequest();
- request.open("POST", apiurl, true);
- request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- request.onreadystatechange = function () {
- if (request.readyState == 4 && request.status == 200) {
- return;
- } else {
- if (request.status == 401 && request.readyState == 4){
- var status = document.getElementById("status");
- clearTimeout(infoTimeout);
- infoTimeout = null;
- status.innerHTML = "Your username or password is not correct.";
- setTimeout(function () {
- status.innerHTML = "";
- }, 3500);
- }
+ // Checks credentials with Pocket (ril)
+ function validateCredentials() {
+ var apiurl = getBaseURL("auth");
+ var params = getPrefix() + "&apikey=" + getApiKey();
+ var request = new XMLHttpRequest();
+ request.open("POST", apiurl, true);
+ request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ request.onreadystatechange = function () {
+ if (request.readyState == 4 && request.status == 200) {
+ return;
+ } else {
+ if (request.status == 401 && request.readyState == 4){
+ var status = document.getElementById("status");
+ clearTimeout(infoTimeout);
+ infoTimeout = null;
+ status.innerHTML = "Your username or password is not correct.";
+ setTimeout(function () {
+ status.innerHTML = "";
+ }, 3500);
+ }
- }
- }
- request.send(params);
}
- </script>
+ }
+ request.send(params);
+ }
+ </script>
</head>
<body onload="restore_options()">
Please sign in to comment.
Something went wrong with that request. Please try again.