« first day (56 days earlier)      last day (4908 days later) » 

user492203
7:04 PM
Help! I can get the selected text with document.getSelection() but if I want to do things like document.getSelection().css.backgroundColor = 'yellow' it does not work and throws an error: TypeError: Cannot set property 'backgroundColor' of undefined
 
user492203
Anyone?
 
@Nyuszika7H err... what? I don't think that you can simply style that text
 
.css is definitely not a property of what .getSelection() returns.
 
user492203
@TimStone Sorry, I meant .style, and I used it in my code but it still throws that error.
 
(which is why it's undefined when you try and set .backgroundColor on it)
 
7:07 PM
@Nyuszika7H split the corresponding textnode in three parts of which the middle one has to be put in a styled element
 
Either/or, getSelection() returns..Well, I think various things depending on the browser, but it isn't a DOM node that you can style.
 
In Ruby you could monkey patch the core and make undefined an object = Epic Win!
 
@IvoWetzel also works in JS, doesn't it?
 
Right, you need to extract the selected text and wrap it in an element that you can style, then reinject that in place of what was selected.
@IvoWetzel Heheh :P
 
@thejh Not really, there's is a variable called undefined which hold the value of undefined
@thejh but var foo; sets foo the value undefined
iirc jQuery has a (function(window, document, undefined){...})(window, document);
this way it secures it self against pages where some idiots have overwritten undefined...
0
Q: How to select and copy all the code from Chrome 's Scripts window

PoorLuzerChrome can show me all the scripts loaded in the current tab. It also lets me edit the code, but one line at a time. Is there a way to select all code highlighted in one go and copy it to the clipboard? Is it possible to paste some code from the clipboard into the currently shown/selected scri...

that's stupid...
People who don't even know CTRL+A should not be allowed to even think about coding!
 
7:13 PM
@CodingKitten is @IvoWetzel a ridiculous man?
 
@Raynos The rchern command randomly prints out all the time :P
 
That sums it up quite well it "prints" a random smiley
ah, he updated his question, now it finally tells us what he wants to do...
 
@IvoWetzel but that wasnt the question I asked. I take it just says something random rather then a response to what I say
 
@Raynos Go ahead and send me your machine learning algorithm then
 
@IvoWetzel I will gimme an hour. Ill have it speak perfect english
 
7:23 PM
> @IvoWetzel I will gimme an hour. Ill have it speak perfect english
 
function response(input) { return ""; }
That way the damn thing shuts up :)
just need to write an algorithm where it learns to shut up rather then shuts up
 
Kev
@IvoWetzel cheers for the answer....can u delete...it won't be allowed bounty if answered before i set it
@IvoWetzel set the bounty that is
 
@Kev Hm doesn't that look... suspicious? The answer is still there and visible for mods
 
user492203
is leaving for 1 hour
 
Kev
@IvoWetzel not really...they pretty much advocated this in a meta discussion a while back
 
7:36 PM
Answers given before a bounty is set are eligible.
Pretty sure I've gotten a bounty that way, hrm.
 
Kev
@IvoWetzel @rchern i dunno...i thought only answers after a bounty was set could receive the bounty
or some other wacky SO rule
 
> Any answer to the question is eligible to be manually awarded the bounty.
You're thinking of automatic awarding
41
Q: How does the bounty system work?

A. Rex What is a bounty? What is the "Featured" tab on the homepage? How can I search for questions that have a bounty attached? How do I start a bounty? When can I start a bounty? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? What happens if there's no ...

 
Kev
@rchern that's what i was trying to find and confirm
 
Consider it found and confirmed! (:
 
Kev
7:43 PM
@rchern i don't think it's breaking the rules to trade rep this tho?
*this way
 
@Kev You're always free to send me real money :P
 
Kev
@IvoWetzel lol :)
@IvoWetzel would need to ask the wife for my pocket money :)
 
Or up vote some of my Node.js answers which you find superb
 
Kev
@IvoWetzel had to do a fake edit so i could put my upvote back after i accidentally undid it. another daft SO rule.
 
@kev Yea, somethings are rather strange around here
 
Kev
7:55 PM
@IvoWetzel over time rules and counter rules have been accreted it's like a codebase that smells bad from everyone having a tinker...like that bloody graph tool :)
 
@kev Well that graph tool is fail by design ;D
 
Kev
@IvoWetzel yes i was thinking that even with my limited JS knowledge it seemed awfully convoluted....but sadly best of a bad lot for this kind of thing.
 
@IvoWetzel seems like the google/youtube guys are smarter than those at vimeo - you can't simply take the URL from the DOM, the google server just spits out a 403 error :[//(]
 
8:20 PM
@thejh The most likely check cookies/referer
target is to get rid of the events handlers on the video tag
yep, copy the html, create a new video tag then just right click to download
 
@IvoWetzel sure? /me tries it out...
 
yep, chrome plays the webm happily
 
@IvoWetzel works! good!
 
 
1 hour later…
user492203
9:29 PM
Hi!
 
user492203
Anyone there?
 
@Nyuszika7H pong
 
user492203
@thejh ping
 
user492203
@finneycanhelp Hi!
 
Hi! :)
Every played with jQuery's explode effect? docs.jquery.com/UI/Effects/Explode
*Ever
@Nyuszika7H pong :D
LOL!
Well, time for me to go look at some stuff for about 26 minutes. See ya! :)
 
9:45 PM
Good day
@Nyuszika7H its a bad sign that you have to delete 4 messages in a row
 
user492203
@Raynos Hi
 
11:56 PM
0
Q: CSS/HTML: element that is centered wont center right

KaremIf you check this: http://jsfiddle.net/QbMmX/1/ Then you can see that the box(div element) is moving more at the left than the text. It doesnt get center like the text does. Why is this occuring and how can i fix this?

 
Hi! How can I send data from jQuery to php?
..without having to construct strings?
 

« first day (56 days earlier)      last day (4908 days later) »