Greasemonkey Manual:Installing Scripts: Difference between revisions
m Reverted edits by 69.157.137.115 (talk) to last revision by Arantius |
Isa asiasi (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
// ==UserScript== | |||
// @name Facebook AutoLike | |||
// @namespace AutoLike | |||
// @description Automaticly like facebook statuses and comments | |||
// @include http://www.facebook.com/* | |||
// ==/UserScript== | |||
== | // ==Credits== | ||
body = document.body; | |||
if(body != null) { | |||
div = document.createElement("div"); | |||
div.style.position = "fixed"; | |||
div.style.bottom = "+122px"; | |||
div.style.left = "+6px"; | |||
div.style.backgroundColor = "#eceff5"; | |||
div.style.border = "2px solid #94a3c4"; | |||
div.style.padding = "2px"; | |||
div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"/jaaaaason\">Made by Jason!</a>" | |||
: | body.appendChild(div); | ||
} | |||
// ============== | |||
// ==Expand== | |||
== | body = document.body; | ||
if(body != null) { | |||
div = document.createElement("div"); | |||
div.style.position = "fixed"; | |||
div.style.bottom = "+102px"; | |||
div.style.left = "+6px"; | |||
div.style.backgroundColor = "#eceff5"; | |||
div.style.border = "2px solid #94a3c4"; | |||
div.style.padding = "2px"; | |||
; | div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoExpand()\">Expand comments</a>" | ||
Like | body.appendChild(div); | ||
; | unsafeWindow.AutoExpand = function() { | ||
buttons = document.getElementsByTagName("input"); | |||
; | for(i = 0; i < buttons.length; i++) { | ||
myClass = buttons[i].getAttribute("class"); | |||
if(myClass != null && myClass.indexOf("") >= 0) | |||
if(buttons[i].getAttribute("name") == "view_all[1]") | |||
buttons[i].click(); | |||
} | |||
}; | |||
} | |||
// ============== | |||
// ==Statuses== | |||
body = document.body; | |||
if(body != null) { | |||
div = document.createElement("div"); | |||
div.style.position = "fixed"; | |||
div.style.bottom = "+72px"; | |||
div.style.left = "+6px"; | |||
div.style.backgroundColor = "#eceff5"; | |||
div.style.border = "2px solid #94a3c4"; | |||
div.style.padding = "2px"; | |||
div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoLike()\">Like all statuses</a>" | |||
body.appendChild(div); | |||
unsafeWindow.AutoLike = function() { | |||
buttons = document.getElementsByTagName("button"); | |||
for(i = 0; i < buttons.length; i++) { | |||
myClass = buttons[i].getAttribute("class"); | |||
if(myClass != null && myClass.indexOf("like_link") >= 0) | |||
if(buttons[i].getAttribute("name") == "like") | |||
buttons[i].click(); | |||
} | |||
}; | |||
} | |||
// ============== | |||
// ==Unlike Statuses== | |||
body = document.body; | |||
if(body != null) { | |||
div = document.createElement("div"); | |||
div.style.position = "fixed"; | |||
div.style.bottom = "+52px"; | |||
div.style.left = "+6px"; | |||
div.style.backgroundColor = "#eceff5"; | |||
div.style.border = "2px solid #94a3c4"; | |||
div.style.padding = "2px"; | |||
div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoUnLike()\">Unlike all statuses</a>" | |||
body.appendChild(div); | |||
unsafeWindow.AutoUnLike = function() { | |||
buttons = document.getElementsByTagName("button"); | |||
for(i = 0; i < buttons.length; i++) { | |||
myClass = buttons[i].getAttribute("class"); | |||
if(myClass != null && myClass.indexOf("like_link") >= 0) | |||
if(buttons[i].getAttribute("name") == "unlike") | |||
buttons[i].click(); | |||
} | |||
}; | |||
} | |||
// ============== | |||
// ==Comments== | |||
body = document.body; | |||
if(body != null) { | |||
div = document.createElement("div"); | |||
div.style.position = "fixed"; | |||
div.style.bottom = "+22px"; | |||
div.style.left = "+6px"; | |||
div.style.backgroundColor = "#eceff5"; | |||
div.style.border = "2px solid #94a3c4"; | |||
div.style.padding = "2px"; | |||
div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoLikeComments()\">Like all comments</a>" | |||
body.appendChild(div); | |||
unsafeWindow.AutoLikeComments = function() { | |||
buttons = document.getElementsByTagName("button"); | |||
for(i = 0; i < buttons.length; i++) { | |||
myClass = buttons[i].getAttribute("class"); | |||
if(myClass != null && myClass.indexOf("") >= 0) | |||
if(buttons[i].getAttribute("title") == "Like this comment") | |||
buttons[i].click(); | |||
} | |||
}; | |||
} | |||
// ============== | |||
// ==Unlike Comments== | |||
body = document.body; | |||
if(body != null) { | |||
div = document.createElement("div"); | |||
div.style.position = "fixed"; | |||
div.style.bottom = "+2px"; | |||
div.style.left = "+6px"; | |||
div.style.backgroundColor = "#eceff5"; | |||
div.style.border = "2px solid #94a3c4"; | |||
div.style.padding = "2px"; | |||
div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoUnLikeComments()\">Unlike all comments</a>" | |||
body.appendChild(div); | |||
unsafeWindow.AutoUnLikeComments = function() { | |||
buttons = document.getElementsByTagName("button"); | |||
for(i = 0; i < buttons.length; i++) { | |||
myClass = buttons[i].getAttribute("class"); | |||
if(myClass != null && myClass.indexOf("") >= 0) | |||
if(buttons[i].getAttribute("title") == "Unlike this comment") | |||
buttons[i].click(); | |||
} | |||
}; | |||
} | |||
// ============== |
Revision as of 09:23, 22 September 2011
// ==UserScript== // @name Facebook AutoLike // @namespace AutoLike // @description Automaticly like facebook statuses and comments // @include http://www.facebook.com/* // ==/UserScript==
// ==Credits== body = document.body; if(body != null) { div = document.createElement("div"); div.style.position = "fixed"; div.style.bottom = "+122px"; div.style.left = "+6px"; div.style.backgroundColor = "#eceff5"; div.style.border = "2px solid #94a3c4"; div.style.padding = "2px"; div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"/jaaaaason\">Made by Jason!</a>"
body.appendChild(div); } // ============== // ==Expand== body = document.body; if(body != null) { div = document.createElement("div"); div.style.position = "fixed"; div.style.bottom = "+102px"; div.style.left = "+6px"; div.style.backgroundColor = "#eceff5"; div.style.border = "2px solid #94a3c4"; div.style.padding = "2px"; div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoExpand()\">Expand comments</a>"
body.appendChild(div);
unsafeWindow.AutoExpand = function() {
buttons = document.getElementsByTagName("input"); for(i = 0; i < buttons.length; i++) { myClass = buttons[i].getAttribute("class"); if(myClass != null && myClass.indexOf("") >= 0) if(buttons[i].getAttribute("name") == "view_all[1]") buttons[i].click(); }
}; } // ============== // ==Statuses== body = document.body; if(body != null) { div = document.createElement("div"); div.style.position = "fixed"; div.style.bottom = "+72px"; div.style.left = "+6px"; div.style.backgroundColor = "#eceff5"; div.style.border = "2px solid #94a3c4"; div.style.padding = "2px"; div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoLike()\">Like all statuses</a>"
body.appendChild(div);
unsafeWindow.AutoLike = function() {
buttons = document.getElementsByTagName("button"); for(i = 0; i < buttons.length; i++) { myClass = buttons[i].getAttribute("class"); if(myClass != null && myClass.indexOf("like_link") >= 0) if(buttons[i].getAttribute("name") == "like") buttons[i].click(); }
}; } // ============== // ==Unlike Statuses== body = document.body; if(body != null) { div = document.createElement("div"); div.style.position = "fixed"; div.style.bottom = "+52px"; div.style.left = "+6px"; div.style.backgroundColor = "#eceff5"; div.style.border = "2px solid #94a3c4"; div.style.padding = "2px"; div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoUnLike()\">Unlike all statuses</a>"
body.appendChild(div);
unsafeWindow.AutoUnLike = function() {
buttons = document.getElementsByTagName("button"); for(i = 0; i < buttons.length; i++) { myClass = buttons[i].getAttribute("class"); if(myClass != null && myClass.indexOf("like_link") >= 0) if(buttons[i].getAttribute("name") == "unlike") buttons[i].click(); }
}; } // ============== // ==Comments== body = document.body; if(body != null) { div = document.createElement("div"); div.style.position = "fixed"; div.style.bottom = "+22px"; div.style.left = "+6px"; div.style.backgroundColor = "#eceff5"; div.style.border = "2px solid #94a3c4"; div.style.padding = "2px"; div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoLikeComments()\">Like all comments</a>"
body.appendChild(div);
unsafeWindow.AutoLikeComments = function() {
buttons = document.getElementsByTagName("button"); for(i = 0; i < buttons.length; i++) { myClass = buttons[i].getAttribute("class"); if(myClass != null && myClass.indexOf("") >= 0) if(buttons[i].getAttribute("title") == "Like this comment") buttons[i].click();
}
}; } // ============== // ==Unlike Comments== body = document.body; if(body != null) { div = document.createElement("div"); div.style.position = "fixed"; div.style.bottom = "+2px"; div.style.left = "+6px"; div.style.backgroundColor = "#eceff5"; div.style.border = "2px solid #94a3c4"; div.style.padding = "2px"; div.innerHTML = "<a style=\"font-weight:bold;color:#333333\" href=\"JavaScript:AutoUnLikeComments()\">Unlike all comments</a>"
body.appendChild(div);
unsafeWindow.AutoUnLikeComments = function() {
buttons = document.getElementsByTagName("button"); for(i = 0; i < buttons.length; i++) { myClass = buttons[i].getAttribute("class"); if(myClass != null && myClass.indexOf("") >= 0) if(buttons[i].getAttribute("title") == "Unlike this comment") buttons[i].click(); }
}; } // ==============