Cenzic 232 Patent
Paid Advertising
sla.ckers.org is
ha.ckers sla.cking
Sla.ckers.org
Whether this is about ha.ckers.org, sla.ckers.org or some other project you are interested in or want to talk about, throw it in here to get feedback. 
Go to Topic: PreviousNext
Go to: Forum ListMessage ListNew TopicSearchLog In
Using the CSS browser history hack for good with Digg
Posted by: drew
Date: March 28, 2007 11:40PM

Hey everyone,

I found a non-evil use for the CSS browser history hack. (If you haven't heard about the trick, Jeremiah talks about it here http://jeremiahgrossman.blogspot.com/2006/08/i-know-where-youve-been.html ).

I just used it to create a "digg this" button that only displays for users that have been to digg.com. The details are on my new blog:

http://int2e.com/blog/

Cheers,
Drew

Options: ReplyQuote
Re: Using the CSS browser history hack for good with Digg
Posted by: rsnake
Date: March 29, 2007 09:09PM

Yup, you can also do think like reward users for having dugg your content. It's non malicious, and kinda a nice thing to do. Granted, it's spoofable, but whatever... maybe it's just a picture of hot girl or something. But it is non-malicious.

- RSnake
Gotta love it. http://ha.ckers.org

Options: ReplyQuote
Re: Using the CSS browser history hack for good with Digg
Posted by: hackathology
Date: March 30, 2007 03:44AM

hahahahah, thats the way to go drew, digg. How about lets do something to allow ha.ckers.org to appear on Digg?

http://hackathology.blogspot.com

Options: ReplyQuote
Re: Using the CSS browser history hack for good with Digg
Posted by: jungsonn
Date: March 31, 2007 01:43PM

Very clever! Nice to see that stuff is going to developed with.

Don't know if you saw mine, but this one is cross browser:


<script>
// credit J.Grossman, & Jungsonn (making it cross browser)

function x0(el,c) {

try{
var x = document.getElementById(el);
if (x.currentStyle) {
var y = x.currentStyle[c];
} else if (window.getComputedStyle) {
var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(c);
}

if(y=='#800080') {
document.write(' --- + visited in MSIE');
}
if (y=="rgb(128, 0, 128)") {
document.write(' --- + visited in Mozilla');
}

} catch (e) { }
}

</script>

<a href="google.com" id="H1">google.com</a><script>x0("H1","color");</script>



Edited 1 time(s). Last edit at 03/31/2007 01:46PM by jungsonn.

Options: ReplyQuote
Re: Using the CSS browser history hack for good with Digg
Posted by: hackathology
Date: March 31, 2007 11:23PM

jungsonn, i had seen your cross browser trick. But how can i test it? Sorry i am really not a very good web guy. Do i have to copy all the codes and paste it in notepad and save it as js or html?

http://hackathology.blogspot.com

Options: ReplyQuote
Re: Using the CSS browser history hack for good with Digg
Posted by: jungsonn
Date: April 01, 2007 07:59AM

just save as html and open it, click it and go back to the script to see what it says. Sometimes it requires a small style tag above it like:

<style>
a:visited { color:#800080; font-size:10px; font-family:verdana,sans-serif;}
</style>

So it know you visited that link.

Options: ReplyQuote
Re: Using the CSS browser history hack for good with Digg
Posted by: hackathology
Date: April 02, 2007 02:09AM

thanks jungsonn. i will try it once i finish my HITB conference over here.

http://hackathology.blogspot.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.