From bea513f5dd0e15fafa7ce121ad2d8daabf1bb4fe Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 20 Aug 2016 20:11:21 +1000 Subject: [PATCH] Jshint tweaks, changelog --- .jshintrc | 6 +- changelog.md | 26 ++++++++ demo/dist/demo.css | 2 +- dist/plyr.css | 2 +- dist/plyr.js | 4 +- src/js/plyr.js | 158 ++++++++++++++++++++++----------------------- 6 files changed, 111 insertions(+), 87 deletions(-) diff --git a/.jshintrc b/.jshintrc index 0d1a70e2..7a55e036 100644 --- a/.jshintrc +++ b/.jshintrc @@ -8,11 +8,11 @@ "node" : false, "rhino" : false, "couch" : false, - "wsh" : true, // Windows Scripting Host. + "wsh" : false, // Windows Scripting Host. "jquery" : false, // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. + "debug" : true, // Allow debugger statements e.g. browser breakpoints. "devel" : true, // Allow developments statements e.g. `console.log();`. // ECMAScript 5. @@ -25,7 +25,7 @@ "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. "curly" : true, // Require {} for every new block or scope. - "eqeqeq" : false, // Require triple equals i.e. `===`. + "eqeqeq" : true, // Require triple equals i.e. `===`. "eqnull" : false, // Tolerate use of `== null`. "evil" : false, // Tolerate use of `eval`. "expr" : false, // Tolerate `ExpressionStatement` as Programs. diff --git a/changelog.md b/changelog.md index df2088dd..e76ee513 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,31 @@ # Changelog +# v1.9.0 +This version contains several ***breaking changes***: + +- `setup()` has been reverted to pre v1.8.0 behaviour; meaning it will return the *instance* rather than the *element*. This is because the reference to the instance is no longer added to the original element (see below). +- The reference to the `plyr` instance is now added to the media element rather than original container. This is because if a container with multiple children was passed to `setup()` the references to all instances would have been added to the container, creating issues. I would recommend using the return value from `setup()` or the new `get()` method to access the instance. +- Players will always be wrapped in their own div now - this makes `setup()` and `destroy()` cleaner. This *may* break any custom styling based on DOM position. + +And some other changes and bug fixes: + +- New `get()` method on the global plyr object to get all instances inside a container +- New API methods: + - `getOriginal()` to get the original, *unmodified* element plyr was setup on (`