diff --git a/war/.eslintrc.js b/war/.eslintrc.js index 18aa717755dd..88d556a78aaa 100644 --- a/war/.eslintrc.js +++ b/war/.eslintrc.js @@ -39,7 +39,6 @@ module.exports = { findFormParent: "readonly", fireEvent: "readonly", Form: "readonly", - getElementOverflowParams: "readonly", global: "readonly", Hash: "readonly", hoverNotification: "readonly", diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index 678260fdad17..1ab1980cda2e 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -2248,35 +2248,6 @@ function toQueryString(params) { return query; } -// eslint-disable-next-line no-unused-vars -function getElementOverflowParams(element) { - // First we force it to wrap so we can get those dimension. - // Then we force it to "nowrap", so we can get those dimension. - // We can then compare the two sets, which will indicate if - // wrapping is potentially happening, or not. - - // Force it to wrap. - element.classList.add("force-wrap"); - var wrappedClientWidth = element.clientWidth; - var wrappedClientHeight = element.clientHeight; - element.classList.remove("force-wrap"); - - // Force it to nowrap. Return the comparisons. - element.classList.add("force-nowrap"); - var nowrapClientHeight = element.clientHeight; - try { - var overflowParams = { - element: element, - clientWidth: wrappedClientWidth, - scrollWidth: element.scrollWidth, - isOverflowed: wrappedClientHeight > nowrapClientHeight, - }; - return overflowParams; - } finally { - element.classList.remove("force-nowrap"); - } -} - // get the cascaded computed style value. 'a' is the style name like 'backgroundColor' function getStyle(e, a) { if (document.defaultView && document.defaultView.getComputedStyle) {