Query Results - Category: JavaScript

Scraping Raw CSS and HTML with YQL

For a recent project I needed a way in JavaScript to pull the sources of a remote stylesheet and a remote webpage, each as plain strings. The immediate problems were with cross-origin resource sharing policies (i.e. you can’t simply load an html resource that’s not on your domain or that is not on a server […]

Happy Birthday Computer Science!

Our computer science department is now fifty years old, so I thought I’d make them a little card to celebrate. Here’s the unminified code, which you can execute in your console: var time=new Date().getTime(); if (time > 1577846298735 – 189345600000) { var year = 1964; var marquee = “Fifty years of smart computing… It’s in […]

JS Promises in Five Quick, Dirty, and Insufficient Minutes

You may have heard about the benefits of using promises, but don’t yet know what they are or how they can be of use to you. In one sentence, promises are objects used for asynchronous actions that resolve in their own time and can have more actions (synchronous or asynchronous) chained onto them that fire […]

15 Posts Found.