mirror of
https://github.com/writeas/paste-chrome
synced 2018-07-20 11:45:21 +00:00
Clean up non-working code and logs
This commit is contained in:
parent
bea6b41d44
commit
add1a3c51d
10
popup.js
10
popup.js
@ -16,13 +16,7 @@ function publish(content, font) {
|
||||
var params = "w=" + encodeURIComponent(content) + "&font=" + font;
|
||||
http.open("POST", url, true);
|
||||
|
||||
//Send the proper header information along with the request
|
||||
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
http.setRequestHeader("User-Agent", "Write.as Chrome Extension v1.0");
|
||||
http.setRequestHeader("Content-length", params.length);
|
||||
http.setRequestHeader("Connection", "close");
|
||||
|
||||
http.onreadystatechange = function() { //Call a function when the state changes.
|
||||
http.onreadystatechange = function() {
|
||||
if (http.readyState == 4) {
|
||||
$publish.classList.remove('disabled');
|
||||
$publish.value = "Publish";
|
||||
@ -44,8 +38,6 @@ function publish(content, font) {
|
||||
$url.value = url;
|
||||
var $urlLink = document.getElementById("url-link");
|
||||
$urlLink.href = url;
|
||||
|
||||
console.log("writeas add " + id + " " + editToken);
|
||||
} else {
|
||||
alert("Failed to post. Please try again.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user