Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolaj92 authored and GreLI committed Mar 23, 2018
1 parent 3801d08 commit dd65b54
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/removeHiddenElems.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports.active = true;
exports.description = 'removes hidden elements (zero sized, with absent attributes)';

exports.params = {
isHidden: true,
displayNone: true,
opacity0: true,
circleR0: true,
Expand Down Expand Up @@ -44,9 +45,15 @@ var regValidPath = /M\s*(?:[-+]?(?:\d*\.\d+|\d+(?:\.|(?!\.)))([eE][-+]?\d+)?(?!\
*
* @author Kir Belevich
*/
exports.fn = function(item, params) {
exports.fn = function (item, params) {

if (item.elem) {
// Removes hidden elements
// https://www.w3schools.com/cssref/pr_class_visibility.asp
if (
params.isHidden &&
item.hasAttr('visibility', 'hidden')
) return false;

// display="none"
//
Expand Down

0 comments on commit dd65b54

Please sign in to comment.