Issue #155  (window.opener, Git/GitHub, JS Utils)

(Skip to the tools section below)

Although it's generally a bad choice to open new windows with JavaScript, you can do some interesting things with it, due to the power given to the different windows, particularly the source window. So if you're new to this sort of thing, here's a quick summary of some features you have at your disposal.

To open a new window you use the method:'example.html', 'windowName', 'location=no,status=no');

The first argument is the page to open, the second argument is a custom window name (of your choice, which you can use to access the window again), followed by a set of "features" separated by commas within the final argument quotes. If you really want to harness the power of opening new windows, however, you'll want to store a reference to the window that's opened:
var myWin ='example.html', 'windowName', 'location=no');

Now with the myWin variable, you can do stuff like this: = 'red';

This is done from the original source window. As long as you're obeying cross-origin rules, you have full access to the child window from the source (or parent). Also, from the child page (in this case, example.html), you can do stuff to, or get info from the source window: = 'orange';

Here I'm using the window.opener property to reference the original source window, changing the background of the source. And note that although you can close windows from the source window, you can't close the original source window via one of the spawned windows.

I'm sure that's pretty basic stuff for many of you, but if you want to examine a really cool chunk of code that manipulates browser windows, check out Browser Ball, a Chrome Experiment by Mark Mahoney. After you try it out, it's worth viewing and beautifying the source to see what's going on.

Now on to this week's tools!
70 JavaScript and DOM Tips for $5 (EPUB, MOBI, PDF)

Git, GitHub, and Command Line Tools

Star History
A line graph generator to display trends for a GitHub repo's star history.

"A tool for reading issues and pull requests in GitHub efficiently. You will be able to read issues by condition of author, repository, organization and etc."

CLI tool. "Provides commands for using Babel, Webpack and Karma together so you can get started developing quickly and reduce the amount of devDependencies and configuration boilerplate."

"A Vim filetype plugin for github/hub."

Mac OSX. "GitHub Notifications on your menu bar."

Bash Infinity
"A standard library and a boilerplate framework for writing tools using bash."

"A handy command line interface for Gulp."

"Automatically installs a git pre-commit script in your git repository which runs your `npm test` on pre-commit."

"Recall what you did on the last working day ..or be nosy and find what someone else did."

The popular distributed version control system is now at version 2.9.

"Provides a simple command-line tool for applying tags and a virtual filesystem so that you can get a tag-based view of your files from within any other program."

Chrome extension. "Links variables to their definition when viewing JavaScript code on Github."

"A minimal project manager for the terminal."

"Encrypts files and stores them inside the git repository, so you will have all the changes for every commit."

384 Pages of CSS for $7 (PDF E-Book)

JavaScript Utilities and Mini Libraries

Real Time Users
"Add a real time user counter to your site in 60 seconds."

"Fast and easy searching inside a page."

An Ajax library that "brings a unified approach allowing server applications to control dynamic updates of client HTML pages."

"Functional, composable, immutable and curried promise sequences that automatically handle Promise resolution. 0.8kb Minified & GZIP'd."

"A JavaScript string manipulation library without npm dependencies."

"A small (4.4kb minified and gzipped), flexible and dependency free library that helps you creating fluid and smooth transitions between your website's pages."

Adds Ajax functionality to an application using just custom HTML attributes.

A code highlighter that doesn't use colors to highlight code snippets, and works for any language, even multiple within the same code block.

"Provides asynchronous iteration functions that have a Promise based interface and it can execute with low CPU usage."

"Useful template literal tags for dealing with strings in ES2015+."

70 JavaScript and DOM Tips for $5 (EPUB, MOBI, PDF)

Multimedia Tools

jQuery plugin that converts alt text on images into simple image labels.

"Applies the right orientation to a JPEG image, based on its EXIF tag."
"The fastest way to create animated gifs from Youtube, Facebook, Vimeo and other video sites. Just upload your own video or paste in a URL and click create a gif."

"The image back-end for web and mobile developers. An end-to-end solution for all your image-related needs."

"A library to help capturing animations created with HTML5 canvas at a fixed framerate."

Rumble Charts
"React components for building composable and flexible charts. It's based on D3.js under the hood, but most of the time you will not feel that."

Method Draw
A fork of SVG Edit, a web-based SVG editor.
384 Pages of CSS for $7 (PDF E-Book)

A Tweet for Thought

Thomas Fuch's hyperbolic look at React. There is some truth to that though.

Suggestions / Corrections

Made something? Send links via Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.

Before I Go...

You've used console.log, now try console.frog.

Thanks to all for subscribing and reading!

Keep tooling,
Copyright © 2013 Web Tools Weekly, All rights reserved.

Email Marketing Powered by MailChimp