Skip to content

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 witho…

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 ar…

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 …

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 modifyi…

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 ea…