jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Remove debug code ......................................................................
Hygiene: Remove debug code We seldom need to debug image widening, so it's probably not necessary to keep this debug code in the repo. Change-Id: If0f48e91ebed5680c2741931f0405af81820f931 --- M app/src/main/assets/bundle.js M www/js/transforms/widenImages.js 2 files changed, 0 insertions(+), 32 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js index ff2907f..77af0dd 100644 --- a/app/src/main/assets/bundle.js +++ b/app/src/main/assets/bundle.js @@ -1164,11 +1164,6 @@ var maxStretchRatioAllowedBeforeRequestingHigherResolution = 1.3; -// If enabled, widened images will have thin red dashed border and -// and widened images for which a higher resolution version was -// requested will have thick red dashed border. -var enableDebugBorders = false; - function widenAncestors (el) { while ((el = el.parentElement) && !el.classList.contains('content_block')) { // Only widen if there was a width setting. Keeps changes minimal. @@ -1230,10 +1225,6 @@ }); image.src = srcsetDict[largestSrcsetDictKey]; - - if (enableDebugBorders) { - image.style.borderWidth = '10px'; - } } } } @@ -1241,13 +1232,6 @@ function widenImage(image) { makeRoomForImageWidening (image); image.classList.add("wideImageOverride"); - - if (enableDebugBorders) { - image.style.borderStyle = 'dashed'; - image.style.borderWidth = '1px'; - image.style.borderColor = '#f00'; - } - useHigherResolutionImageSrcFromSrcsetIfNecessary(image); } diff --git a/www/js/transforms/widenImages.js b/www/js/transforms/widenImages.js index 319cacb..71812ac 100644 --- a/www/js/transforms/widenImages.js +++ b/www/js/transforms/widenImages.js @@ -3,11 +3,6 @@ var maxStretchRatioAllowedBeforeRequestingHigherResolution = 1.3; -// If enabled, widened images will have thin red dashed border and -// and widened images for which a higher resolution version was -// requested will have thick red dashed border. -var enableDebugBorders = false; - function widenAncestors (el) { while ((el = el.parentElement) && !el.classList.contains('content_block')) { // Only widen if there was a width setting. Keeps changes minimal. @@ -69,10 +64,6 @@ }); image.src = srcsetDict[largestSrcsetDictKey]; - - if (enableDebugBorders) { - image.style.borderWidth = '10px'; - } } } } @@ -80,13 +71,6 @@ function widenImage(image) { makeRoomForImageWidening (image); image.classList.add("wideImageOverride"); - - if (enableDebugBorders) { - image.style.borderStyle = 'dashed'; - image.style.borderWidth = '1px'; - image.style.borderColor = '#f00'; - } - useHigherResolutionImageSrcFromSrcsetIfNecessary(image); } -- To view, visit https://gerrit.wikimedia.org/r/305244 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If0f48e91ebed5680c2741931f0405af81820f931 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Mholloway <mhollo...@wikimedia.org> Gerrit-Reviewer: BearND <bsitzm...@wikimedia.org> Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org> Gerrit-Reviewer: Dbrant <dbr...@wikimedia.org> Gerrit-Reviewer: Niedzielski <sniedziel...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits