Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

unix style

  • Loading branch information...
commit 1460dc37c04dd95d20e2814804534e78c46eabfe 1 parent 841fe2a
@Gemorroj authored
Showing with 146 additions and 148 deletions.
  1. +13 −13 background.js
  2. +8 −8 index.html
  3. +67 −67 popup.css
  4. +9 −9 popup.html
  5. +49 −51 popup.js
View
26 background.js
@@ -1,14 +1,14 @@
-function getTab () {
- return opera.extension.tabs.getFocused();
-}
-
-opera.contexts.toolbar.addItem(opera.contexts.toolbar.createItem({
- title: "Find logins for websites that force you to register.",
- icon: "icons/icon18.png",
- disabled: false,
- popup: {
- href: "popup.html",
- width: 400,
- height: 500
- }
+function getTab () {
+ return opera.extension.tabs.getFocused();
+}
+
+opera.contexts.toolbar.addItem(opera.contexts.toolbar.createItem({
+ title: "Find logins/passwords for websites that force you to register.",
+ icon: "icons/icon18.png",
+ disabled: false,
+ popup: {
+ href: "popup.html",
+ width: 400,
+ height: 500
+ }
}));
View
16 index.html
@@ -1,9 +1,9 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="utf-8" />
- <title>BugMeNot</title>
- <script type="text/javascript" src="background.js"></script>
- </head>
- <body></body>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset="utf-8" />
+ <title>BugMeNot</title>
+ <script type="text/javascript" src="background.js"></script>
+ </head>
+ <body></body>
</html>
View
134 popup.css
@@ -1,68 +1,68 @@
-body {
- color: rgb(204, 204, 204);
- font-family: "Geneva", "Arial", "Helvetica", "san-serif";
- font-size: 11px;
- line-height: 150%;
-}
-
-div.panel {
- border: 1px solid rgb(152, 152, 152);
- margin: 5px 0;
- padding: 12px;
-}
-
-div.panel.minor {
- background-color: rgb(46, 46, 46);
- text-align: left;
-}
-
-div.panel h2 {
- font-size: 12px;
- font-weight: 400;
- letter-spacing: 2px;
- margin-bottom: 0.3em;
- text-transform: uppercase;
-}
-
-div.account {
- border-top: 1px dashed rgb(92, 92, 92);
- clear: left;
- height: 83px;
- padding: 10px;
-}
-
-div.account table {
- border-spacing: 6px 3px;
- float: left;
- width: 320px;
-}
-
-div.account th {
- color: rgb(152, 152, 152);
- font-size: 10px;
- font-weight: 400;
- text-align: right;
- width: 35px;
-}
-
-div.account td {
- background-color: rgb(33, 33, 33);
- color: rgb(255, 255, 255);
- font-family: "Courier New", "Courier", monospace;
- padding: 0 3px;
-}
-
-div.account td.stats {
- background-color: rgb(46, 46, 46);
- color: rgb(152, 152, 152);
-}
-
-div.account td.stats em.bad {
- color: rgb(205, 0, 0);
- font-style: normal;
-}
-
-div.account td.stats em.good {
- color: rgb(0, 205, 5);
- font-style: normal;
+body {
+ color: rgb(204, 204, 204);
+ font-family: "Geneva", "Arial", "Helvetica", "san-serif";
+ font-size: 11px;
+ line-height: 150%;
+}
+
+div.panel {
+ border: 1px solid rgb(152, 152, 152);
+ margin: 5px 0;
+ padding: 12px;
+}
+
+div.panel.minor {
+ background-color: rgb(46, 46, 46);
+ text-align: left;
+}
+
+div.panel h2 {
+ font-size: 12px;
+ font-weight: 400;
+ letter-spacing: 2px;
+ margin-bottom: 0.3em;
+ text-transform: uppercase;
+}
+
+div.account {
+ border-top: 1px dashed rgb(92, 92, 92);
+ clear: left;
+ height: 83px;
+ padding: 10px;
+}
+
+div.account table {
+ border-spacing: 6px 3px;
+ float: left;
+ width: 320px;
+}
+
+div.account th {
+ color: rgb(152, 152, 152);
+ font-size: 10px;
+ font-weight: 400;
+ text-align: right;
+ width: 35px;
+}
+
+div.account td {
+ background-color: rgb(33, 33, 33);
+ color: rgb(255, 255, 255);
+ font-family: "Courier New", "Courier", monospace;
+ padding: 0 3px;
+}
+
+div.account td.stats {
+ background-color: rgb(46, 46, 46);
+ color: rgb(152, 152, 152);
+}
+
+div.account td.stats em.bad {
+ color: rgb(205, 0, 0);
+ font-style: normal;
+}
+
+div.account td.stats em.good {
+ color: rgb(0, 205, 5);
+ font-style: normal;
}
View
18 popup.html
@@ -1,10 +1,10 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="utf-8" />
- <title>BugMeNot</title>
- <script type="text/javascript" src="popup.js"></script>
- <link type="text/css" href="popup.css" rel="stylesheet" />
- </head>
- <body><div class="panel minor" id="val"><img src="loader.gif" alt="Please, Wait..." /></div></body>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset="utf-8" />
+ <title>BugMeNot</title>
+ <script type="text/javascript" src="popup.js"></script>
+ <link type="text/css" href="popup.css" rel="stylesheet" />
+ </head>
+ <body><div class="panel minor" id="val"><img src="loader.gif" alt="Please, Wait..." /></div></body>
</html>
View
100 popup.js
@@ -1,52 +1,50 @@
-
-
-window.addEventListener('DOMContentLoaded', function () {
- var key;
-
- function decoder (strInput) {
- strInput = window.atob(strInput);
- var strOutput = "", intOffset = (key + 112) / 12;
- for (var i = 4, l = strInput.length; i < l; i++) {
- strOutput += String.fromCharCode(strInput.charCodeAt(i) - intOffset)
- }
- return strOutput;
- }
-
- function getContent (url, callback) {
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.onreadystatechange = function () {
- if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
- return callback(parseContent(xmlhttp.responseXML));
- } else if (xmlhttp.readyState == 4 && xmlhttp.status == 404) {
- return callback('Not Found');
- } else if (xmlhttp.readyState >= 4) {
- return callback('Error!<br />URL: ' + url + '<br />Status: ' + xmlhttp.status);
- }
- };
- xmlhttp.open("GET", url, false);
- xmlhttp.send(null);
- }
-
- function parseContent (xml) {
- key = Number(xml.querySelectorAll("script")[1].innerText.replace(/[^0-9-]/g, ''));
-
- var form = xml.querySelector("div.panel.minor");
- var nodes = form.querySelectorAll("form");
- for (var i = 0, l = nodes.length; i < l; i++) {
- nodes[i].parentNode.removeChild(nodes[i]);
- }
-
- return form.innerHTML.replace(/<script>d\('(.+)'\);<\/script>/g, function (str, p1) {
- return decoder(p1);
- });
- }
-
- var tab = opera.extension.bgProcess.getTab(), win;
- if (tab && tab.url && (win = tab.url.split("/")[2])) {
- getContent('http://www.bugmenot.com/view/' + win, function (text) {
- document.getElementById("val").innerHTML = text;
- });
- } else {
- document.getElementById("val").innerHTML = "=)";
- }
+window.addEventListener('DOMContentLoaded', function () {
+ var key;
+
+ function decoder (strInput) {
+ strInput = window.atob(strInput);
+ var strOutput = "", intOffset = (key + 112) / 12;
+ for (var i = 4, l = strInput.length; i < l; i++) {
+ strOutput += String.fromCharCode(strInput.charCodeAt(i) - intOffset)
+ }
+ return strOutput;
+ }
+
+ function getContent (url, callback) {
+ var xmlhttp = new XMLHttpRequest();
+ xmlhttp.onreadystatechange = function () {
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+ return callback(parseContent(xmlhttp.responseXML));
+ } else if (xmlhttp.readyState == 4 && xmlhttp.status == 404) {
+ return callback('Not Found');
+ } else if (xmlhttp.readyState >= 4) {
+ return callback('Error!<br />URL: ' + url + '<br />Status: ' + xmlhttp.status);
+ }
+ };
+ xmlhttp.open("GET", url, false);
+ xmlhttp.send(null);
+ }
+
+ function parseContent (xml) {
+ key = Number(xml.querySelectorAll("script")[1].innerText.replace(/[^0-9-]/g, ''));
+
+ var form = xml.querySelector("div.panel.minor");
+ var nodes = form.querySelectorAll("form");
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ nodes[i].parentNode.removeChild(nodes[i]);
+ }
+
+ return form.innerHTML.replace(/<script>d\('(.+)'\);<\/script>/g, function (str, p1) {
+ return decoder(p1);
+ });
+ }
+
+ var tab = opera.extension.bgProcess.getTab(), win;
+ if (tab && tab.url && (win = tab.url.split("/")[2])) {
+ getContent('http://www.bugmenot.com/view/' + win, function (text) {
+ document.getElementById("val").innerHTML = text;
+ });
+ } else {
+ document.getElementById("val").innerHTML = "=)";
+ }
}, false);
Please sign in to comment.
Something went wrong with that request. Please try again.