Skip to content
Advertisement

Convert slug variable to title text with javascript

I’m trying to do something that would be similar to turning a url slug-like variable into text that could be used for a title. So, I have a variable for example that is like this: I’d like to not use a regex to do this if possible somehow, but I don’t think there’s a way to do it without one.

Cross-domain connection in Socket.IO

Is it possible to use Socket.IO in a cross domain manner? If so, how? The possibility is mentioned around the web but no code examples are given anywhere. Answer Quoting the socket.io FAQ: Does Socket.IO support cross-domain connections? Absolutely, on every browser! As to how it does it: Native WebSockets are cross-domain by design, socket.io serves a flash policy file

DOM change event for Opera

So far I found how to do it in Chrome, the DOMSubtreeModified event: Is there a JavaScript/jQuery DOM change listener? Apparently it works in Firefox and IE 9 too. Do you know solutions for detecting DOM changes in other browsers such as Opera? And maybe older versions if IE, because I’m sure the event above doesn’t work in IE 6-7-8…

Event propagation, overlay and drag-and-drop events

I want to overlay a div over the viewport when the user drags a file onto the window. However, I’m having trouble with the event propagation. When I set the overlay to display: block it appears to fire off a dragleave event and then another dragenter and then another dragleave again, so it’s always in a post-dragleave state. Of course

Chrome extension to read HTTP response

I have this Chrome extension that modifies the header of requests before sending them. I now would like to be able, within the same extension, to check the header of the response. I searched throughout the Chrome Extension APIs but I couldn’t find anything of interest. This is the code I use for modifying the header of the request, maybe

How to select an input element by value using javascript?

I’ve seen it’s jquery equivalent: But how do you select it using pure javascript (no jQuery). Thanks for all the responses so far but I’m sure if it is working correctly, I need to change the value of the input into something else. I though I could do this by But it appears to be not that easy. Any ideas.

Advertisement