nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

View File

@@ -2,12 +2,11 @@
exports.type = 'perItem';
exports.active = false;
exports.active = true;
exports.description = 'removes viewBox attribute when possible (disabled by default)';
exports.description = 'removes viewBox attribute when possible';
var regViewBox = /^0\s0\s([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)\s([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)$/,
viewBoxElems = ['svg', 'pattern'];
var viewBoxElems = ['svg', 'pattern', 'symbol'];
/**
* Remove viewBox attr which coincides with a width/height box.
@@ -33,15 +32,15 @@ exports.fn = function(item) {
item.hasAttr('height')
) {
var match = item.attr('viewBox').value.match(regViewBox);
var nums = item.attr('viewBox').value.split(/[ ,]+/g);
if (match) {
if (
item.attr('width').value === match[1] &&
item.attr('height').value === match[3]
) {
item.removeAttr('viewBox');
}
if (
nums[0] === '0' &&
nums[1] === '0' &&
item.attr('width').value.replace(/px$/, '') === nums[2] && // could use parseFloat too
item.attr('height').value.replace(/px$/, '') === nums[3]
) {
item.removeAttr('viewBox');
}
}