Skip to content

Commit

Permalink
изменения на сайте bugmenot
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Mar 11, 2014
1 parent 2afa324 commit 8ad33b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webkit/manifest.json
Expand Up @@ -17,5 +17,5 @@
"default_icon": "icons/icon16.png",
"default_popup": "popup.html"
},
"permissions": ["tabs", "http://www.bugmenot.com/"]
"permissions": ["tabs", "http://bugmenot.com/"]
}
3 changes: 2 additions & 1 deletion webkit/popup.js
Expand Up @@ -61,6 +61,7 @@ window.addEventListener('DOMContentLoaded', function () {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
//FIXME: теперь это не XML
return callback(parseContent(xmlhttp.responseXML));
} else if (xmlhttp.readyState == 4 && xmlhttp.status == 404) {
return callback('Not Found');
Expand Down Expand Up @@ -88,7 +89,7 @@ window.addEventListener('DOMContentLoaded', function () {
chrome.tabs.query({"active": true}, function (tabs) {
var tab = tabs[0], win;
if (tab && tab.url && (win = tab.url.split("/")[2])) {
getContent('http://www.bugmenot.com/view/' + win, function (text) {
getContent('http://bugmenot.com/view/' + win, function (text) {
document.getElementById("val").innerHTML = text;

var votes = document.querySelectorAll("input[type='submit'][name='vote']");
Expand Down

0 comments on commit 8ad33b5

Please sign in to comment.