Issue #155 (window.opener, Git/GitHub, JS Utils)
(Skip to the tools section below)
To open a new window you use the window.open() method:
window.open('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 = window.open('example.html', 'windowName', 'location=no');
Now with the myWin variable, you can do stuff like this:
myWin.document.body.style.background = '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:
window.opener.document.body.style.background = '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!
Git, GitHub, and Command Line Tools
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."
"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."
"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."
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 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+."
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."
"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."
A fork of SVG Edit, a web-based SVG editor.
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!