do you have any idea how to turn off scrollable overflow linked to html elemen in web page?

basically when you scroll, it auto-scrolls back.

do you have any idea how to turn off scrollable overflow linked to html element in web page?

basically when you scroll web page Y, web page auto-scrolls it back. need to countermeasure this inhumanities!


Blocked auto-scroll to:
Object { x: 0, y: 1103 }
​
x: 0
​
y: 1103
​
: Object { … }
​​
defineGetter: function defineGetter()
​​​
length: 2
​​​
name: "defineGetter"
​​​
: function ()
​​
defineSetter: function defineSetter()
​​​
length: 2
​​​
name: "defineSetter"
​​​
: function ()
​​
lookupGetter: function lookupGetter()
​​​
length: 1
​​​
name: "lookupGetter"
​​​
: function ()
​​
lookupSetter: function lookupSetter()
​​​
length: 1
​​​
name: "lookupSetter"
​​​
: function ()
​​
proto:
​​
constructor: function Object()
​​​
assign: function assign()
​​​
create: function create()
​​​
defineProperties: function defineProperties()
​​​
defineProperty: function defineProperty()
​​​
entries: function entries()
​​​
freeze: function freeze()
​​​
fromEntries: function fromEntries()
​​​
getOwnPropertyDescriptor: function getOwnPropertyDescriptor()
​​​
getOwnPropertyDescriptors: function getOwnPropertyDescriptors()
​​​
getOwnPropertyNames: function getOwnPropertyNames()
​​​
getOwnPropertySymbols: function getOwnPropertySymbols()
​​​
getPrototypeOf: function getPrototypeOf()
​​​
groupBy: function groupBy()
​​​
hasOwn: function hasOwn()
​​​
is: function is()
​​​
isExtensible: function isExtensible()
​​​
isFrozen: function isFrozen()
​​​
isSealed: function isSealed()
​​​
keys: function keys()
​​​
length: 1
​​​
name: "Object"
​​​
preventExtensions: function preventExtensions()
​​​
prototype: Object { … }
​​​
seal: function seal()
​​​
setPrototypeOf: function setPrototypeOf()
​​​
values: function values()
​​​
: function ()
​​
hasOwnProperty: function hasOwnProperty()
​​​
length: 1
​​​
name: "hasOwnProperty"
​​​
: function ()
​​
isPrototypeOf: function isPrototypeOf()
​​​
length: 1
​​​
name: "isPrototypeOf"
​​​
: function ()
​​
propertyIsEnumerable: function propertyIsEnumerable()
​​​
length: 1
​​​
name: "propertyIsEnumerable"
​​​
: function ()
​​
toLocaleString: function toLocaleString()
​​​
length: 0
​​​
name: "toLocaleString"
​​​
: function ()
​​
toString: function toString()
​​​
length: 0
​​​
name: "toString"
​​​
: function ()
​​
valueOf: function valueOf()
​​​
length: 0
​​​
name: "valueOf"
​​​
: function ()
​​
<get __proto__()>: function proto()
​​​
length: 0
​​​
name: "get proto"
​​​
: function ()
​​
<set __proto__()>: function proto()
​​​
length: 1
​​​
name: "set proto"
​​​
: function ()
Scroll Lock Remover (Anti-Auto-Scroll).user.js:55:21

""".

would be nice to show not verbosly actual thing which is corresponding to such inhumanities ivolved.

well, we do not need to trace a specific web site, because it is in global scope in meta "// @match", just need to catch that specific corresponding inumane thing and get it naked in console, not too verbosly.

not sure what you have done, but this thing clearly breaching realities now. no any console web browser's logs visible but it prevents an auto-scroll rollbacks.

can you further modernize this code and repel all inhumanities away from human being? just fantasize what there else can possibly be and how we may repel such a mystery.

not sure what you have done, but this thing clearly breaching realities now. no any console web browser's logs visible but it prevents an auto-scroll rollbacks.

can you further modernize this code and repel all inhumanities away from human being? just fantasize what there else can possibly be and how we may repel such a mystery. not only about scrollings in concept but absolutely everything there can possibly happen in this digital universe.

you overthinked it. it now not protecting against auto-scroll rollbacks as before. also, fingerprintings and trackers protections already in firefox and tor web browser this script working in, so need something much more interesting and robustly repellious.

no, this script works, while your further implementations failing badly, robo:

"""

// ==UserScript==
// @name Global Anti-Auto-Scroll (Clean Logging)
// @version 1.0
// @description Block any form of auto-scroll and log the attempt in a clean way.
// @author ComradeDev
// @match :///*
// @grant none
// ==/UserScript==

(function () {
'use strict';

// Prevent overscroll and enforce manual control
const disableScrollRules = `
    html, body {
        overscroll-behavior: none !important; /* Prevents overflow-induced auto-scroll */
        overflow-anchor: none !important;    /* Stops near-element scroll anchoring */
        scroll-behavior: auto !important;    /* Forces no auto-smooth scroll */
    }
`;

// Inject CSS to disable global scroll behaviors
const injectCSS = () => {
    if (!document.querySelector("#disable-scroll-style")) {
        const style = document.createElement("style");
        style.id = "disable-scroll-style";
        style.innerHTML = disableScrollRules;
        document.head.appendChild(style);
    }
};

const hijackScrollBehaviors = () => {
    // Override `scrollTo`
    const originalScrollTo = window.scrollTo;
    window.scrollTo = function (x, y) {
        console.log(`🚨 Blocked auto-scroll to: x=${x}, y=${y}`);
    };

    // Override `scrollBy`
    const originalScrollBy = window.scrollBy;
    window.scrollBy = function (x, y) {
        console.log(`🚨 Blocked auto-scroll by: x=${x}, y=${y}`);
    };

    // Block programmatic changes to `scrollTop` and `scrollLeft`
    const propertiesToOverride = ["scrollTop", "scrollLeft"];
    propertiesToOverride.forEach((prop) => {
        Object.defineProperty(window, prop, {
            set: function (val) {
                console.log(`🚨 Blocked programmatic change to '${prop}': ${val}`);
            },
            configurable: true,
        });
    });
};

// CSS Injection to neutralize scroll styles
injectCSS();

// Hook into programmatic scrolling
hijackScrollBehaviors();

// Observe DOM mutations to reapply styles dynamically
const observer = new MutationObserver(() => {
    injectCSS(); // Reapply scroll-inhibiting CSS in case of style resets
});

observer.observe(document.body, { childList: true, subtree: true });


})();

""".

you just leave it as-is and integrate furtheresques as described above.

is it block itself?:

"""

🚨 Blocked setInterval attempt involving scrolling manipulation: () => {
if (window.scrollX !== lastPosition.x || window.scrollY !== lastPosition.y) {
console.warn(🚨 Scroll rollback detected. Restoring to last position: x=${lastPosition.x}, y=${lastPosition.y});
window.scrollTo(lastPosition.x, lastPosition.y);
} else {
lastPosition = { x: window.scrollX, y: window.scrollY }; // Update last known good position
}
}

""".

also, checked it second time, and non of actual anti-auto-scroll rollback userscript works.

nope it does not function. then you are basically unable to do a simple thing.

here it seems in this specific script .com/v-93da770e155/v3/js/skins/min/default.footer.static.js":

"""

/* Built on 2023-06-20 07:45:00 /
!function(){var e=function(e,t,n){var i=document.getElementById("header-"+(t.is_desktop?"desktop-":"mobile-")+e+"-toggle");i&&(t.bIsOpened=!1,t.menu=document.getElementById(t.id),t.menu_toggler=i,t.toggle=function(i){if(void 0===i||i!==t.bIsOpened){if(i=!t.bIsOpened){window.xv.menus.closeAll(t.iAllMenuId);for(var s in n)s!==e&&n[s].bToggle&&n[s].toggle(!1);xv.dom.removeClass(t.menu,t.hide_class?t.hide_class:"mobile-hide"),xv.dom.addClass(t.menu_toggler,t.icon_cls),t.body_cls_onopen&&xv.dom.addClass(document.body,t.body_cls_onopen),t.dontScrollToTop||xv.dom.scrollToTop()}else xv.dom.addClass(t.menu,t.hide_class?t.hide_class:"mobile-hide"),t.body_cls_onopen&&xv.dom.removeClass(document.body,t.body_cls_onopen),xv.dom.removeClass(t.menu_toggler,t.icon_cls);t.bIsOpened=i,i||"function"!=typeof t.onclose_func||t.onclose_func(t),i&&"function"==typeof t.onopen_func&&t.onopen_func(t)}},t.iAllMenuId=window.xv.menus.addClose(function(){t.toggle(!1)}),window.xv.mobile.togglers.push(t),i.onclick=function(e){return e||(e=this.originalEvent),e&&("function"==typeof e.preventDefault?e.preventDefault():e.returnValue=!1),t.toggle(),!1})},t={togglers:new Array,menus_init:function(t){for(var n in t)e(n,t[n],t)}};window.xv||(window.xv={}),window.xv.mobile=t}(),function(){window.xv||(window.xv={});var e=function(e){this.sId=e.id,this.$Content=document.createElement("div"),this.setContent(e.c),this.sType=e.t,this.xMsgManager=e.xmm,this.fCallback="undefined"!=typeof e.cf&&e.cf,this.bHasCallbackFunc=!1!==this.fCallback,this.bDeletable=!1,this.sReadId="string"==typeof e.ci?e.ci:"string"==typeof e.ri&&e.ri,this.sDeleteId=!1!==this.sReadId&&"del"+this.sReadId,this.sHash="string"==typeof e.h?e.h:"undefined"!=typeof e.h&&"function"==typeof e.h.toString&&e.h.toString(),this.iCookieExpires="number"==typeof e.ce&&e.ce,this.iLastTimeInView=!1,this.bInPage="boolean"==typeof e.bInPage&&e.bInPage,this.bViewed="boolean"==typeof e.r&&e.r,this.bNotif="boolean"==typeof e.n&&e.n,this.sProfileName="string"==typeof e.p&&e.p,this.bNotifCountOnly=!1,this.bAdded=!1,this.bDeleted=!1,this.bIsPreview=!1,this.tPreviewEnd=!1,this.bLoader="boolean"==typeof e.bLoader&&e.bLoader,this.sLink="string"==typeof e.l&&e.l,this.sLinkTitle="string"==typeof e.lt&&e.lt,this.sImg="string"==typeof e.i&&e.i,this.sImgAlt="string"==typeof e.ia&&e.ia;var t=this;this.isInPage()?($Elem=this.getInPageElem(),$Elem?($DelBtn=$Elem.getElementsByClassName("delete"),$DelBtn&&$DelBtn[0]&&(!1!==this.sDeleteId?(t.bDeletable=!0,xv.dom.addEventListener($DelBtn[0],"click",function(){t"delete"})):$DelBtn.parentNode.removeChild($DelBtn)),this.bAdded=!0):this.bNotifCountOnly=!0):document.readyState&&"complete"===document.readyState?this.bHasCallbackFunc?this.setCallbackFunc():this.setTapReduce():xv.dom.addEventListener(window,"load",function(){t.bHasCallbackFunc?t.setCallbackFunc(e.cf):t.setTapReduce()}),!1!==this.iCookieExpires&&!1!==this.sHash&&this.xMsgManager.registerHash(this.sHash,this.iCookieExpires)};e.prototype={oIconClass:{success:"check-circle",error:"close-circle",warning:"warning-circle",question:"question-circle-o",info:"info-circle"},isAdded:function(){return this.bAdded},setAdded:function(e){"boolean"!=typeof e&&(e=!0),this.bAdded=e,this.isNotif()&&(this.bAdded?(this.xMsgManager.addToAddedNotifIds(this.sId),this.isNotifCountOnly()&&(this.bNotifCountOnly=!1),this.bDeletable=!0):this.xMsgManager.removeFromAddedNotifIds(this.sId))},isNotif:function(){return this.bNotif},isNotifCountOnly:function(){return this.bNotifCountOnly},getHash:function(){return this.sHash},hasBeenWatched:function(){if(this.isViewed())return!0;if(!this.isAdded())return!1;if(!xv.dom.isElementInView(this.getRender(),!0,{scroll_marge:5}))return this.iLastTimeInView=!1,!1;if(this.iLastTimeInView>0){if(Date.now()-this.iLastTimeInView>1e3)return!0}else this.iLastTimeInView=Date.now();return!1},isViewed:function(){return this.bViewed},setViewed:function(e){"boolean"!=typeof e&&(e=!0),this.bViewed=e},isPreview:function(){return this.bIsPreview},setPreview:function(e,t){!1!==this.tPreviewEnd&&clearTimeout(this.tPreviewEnd),"boolean"!=typeof e&&(e=!0);var n=this,i=this.getRender(!1,!0);this.xMsgManager.isOpened()?this.removePreview():"function"==typeof $?e?($(i).stop().hide().slideDown(50),this.bIsPreview=!0):$(i).stop().slideUp("slow",function(){n.removePreview(),n.xMsgManager.hasPreview()||"boolean"==typeof t&&!1===t||n.xMsgManager.emptyPreviewContainer()}):(this.bIsPreview=e,this.bIsPreview||n.xMsgManager.hasPreview()||"boolean"==typeof t&&!1===t||n.xMsgManager.emptyPreviewContainer()),e?this.tPreviewEnd=setTimeout(function(){n.setAdded(!1),n.tPreviewEnd=!1,n.setPreview(!1)},3e3):n.xMsgManager.updateMsgContainer()},removePreview:function(){if(!this.isNotif())return!1;this.bIsPreview=!1;var e=this.getRender(!0,!0);if(!e)return!1;"function"==typeof $&&$(e).stop(!0,!0).show();var t=this.xMsgManager.getPreviewMsgContainer();if(e.parentNode!==t)return!1;t.removeChild(e)},isClosable:function(){return this.bDeletable},setAsRead:function(){this.sReadId=!1,this.isNotif()&&"number"==typeof this.xMsgManager.iNotifsUnviewed&&this.xMsgManager.iNotifsUnviewed>0&&(this.xMsgManager.iNotifsUnviewed--,this.xMsgManager.updateToggleBtnBadge())},getReadId:function(){return this.sReadId||!1},getDeleteId:function(){return this.sDeleteId||!1},isUnread:function(){return"string"==typeof this.sReadId},unDelete:function(){this.bDeleted=!1,this.xMsgManager.updateAllRenders()},"delete":function(e,t){var n=this;if(this.isInPage())return void n.xMsgManager.setAsDeleted([n],function(e){e.result&&(n.bDeleted=!0,$Elem=n.getInPageElem(),$Elem&&("function"==typeof $?$($Elem).animate({right:"-10%",opacity:0},"fast",function(){$($Elem).slideUp("fast",function(){$($Elem).remove()})}):$Elem.parentNode.removeChild($Elem)),n.xMsgManager.updateAllRenders())});this.bDeleted=!0;var i=this.getRender(!0);!1!==i&&i.parentNode&&("function"==typeof $&&!0!==t?$(i).animate({right:"-100%"},"fast",function(){$(i).slideUp("fast",function(){"function"==typeof e&&e(),$(i).remove(),n.xMsgManager.updateAllRenders()})}):(i.parentNode.removeChild(i),this.xMsgManager.updateAllRenders(),"function"==typeof e&&e())),this.setAdded(!1)},isDeleted:function(){return this.bDeleted},isLoader:function(){return!!this.bLoader},setContent:function(e){this.$Content.innerHTML=e},getRender:function(e,t){if("undefined"!=typeof this.$Render)return t||this.removePreview(),this.$Render;if(e)return!1;if(this.isInPage())return this.getInPageRender();this.$Render=document.createElement("div"),this.$Render.className="x-message x-message-"+this.sType+(this.bHasCallbackFunc?" has-callback":"")+(this.isViewed()?"":" unviewed"),this.$Render.id=this.sId,this.$DivContent=document.createElement("div"),this.$DivContent.className="content",this.$Render.appendChild(this.$DivContent);var n;if("string"==typeof this.sLink&&this.sLink.length>0?(n=document.createElement("a"),n.setAttribute("href",this.sLink),"string"==typeof this.sLinkTitle&&this.sLinkTitle.length>0&&n.setAttribute("title",this.sLinkTitle),this.$DivContent.appendChild(n)):n=this.$DivContent,"string"==typeof this.sImg&&this.sImg.length>0){var i=document.createElement("img");i.setAttribute("src",this.sImg),i.setAttribute("alt","string"==typeof this.sImgAlt&&this.sImgAlt.length>0?this.sImgAlt:""),n.appendChild(i)}n.appendChild(this.$Content);var s=this.getProfileImgSrc();if("string"==typeof s){var o=document.createElement("span");o.className="bg-icon bg-img",o.style.backgroundImage='url("'+s+'")',this.$Render.appendChild(o)}else{var a=this.getIconClass();if("string"==typeof a){var d=document.createElement("span");d.className="bg-icon icon-f icf-"+a,this.$Render.appendChild(d)}}var r=this.isClosable(),l=document.createElement("a"),c=document.createElement("span");l.className=r?"del":"reduce",l.setAttribute("href","#"),l.setAttribute("title",xv.utils.unescape(xv.i18n.(r?"misc.delete":"misc.reduce"))),c.className="icon-f icf-"+(r?"close-thin":"angle-down"),l.appendChild(c);var g=this;return r?xv.dom.addEventListener(l,"click",function(){g.xMsgManager.delById(g.sId)}):xv.dom.addEventListener(l,"click",function(){g.xMsgManager.toggleOpening(!1)}),this.$Render.appendChild(l),this.$Render},getInPageRender:function(){this.$Render=document.createElement("div"),this.$Render.className="account-notification unread",this.$Render.id=this.sId;var e=document.createElement("div");e.className="notification x-message-"+this.sType;var t=this.getProfileImgSrc();if("string"==typeof t){var n=document.createElement("span");n.className="bg-icon bg-img",n.style.backgroundImage='url("'+t+'")',e.appendChild(n)}else{var i=this.getIconClass();if("string"==typeof i){var s=document.createElement("span");s.className="bg-icon icon-f icf-white-fill icf-"+i,e.appendChild(s)}}var o=document.createElement("div");o.className="content",o.appendChild(this.$Content),e.appendChild(o),this.$Render.appendChild(e);var a=document.createElement("button");a.setAttribute("type","button"),a.className="delete";var d=document.createElement("span");d.className="icon-f icf-close-thin",a.appendChild(d),this.$Render.appendChild(a);var r=this;return xv.dom.addEventListener(a,"click",function(){r"delete"}),this.$Render},updateRender:function(){var e=this.getRender(!0,!0);e&&(this.isViewed()?xv.dom.removeClass(e,"unviewed"):xv.dom.addClass(e,"unviewed"))},getDivContent:function(e,t){return!(!this.getRender(e,t)||!this.$DivContent)&&this.$DivContent},getProfileImgSrc:function(){return"string"==typeof this.sProfileName&&"/profiles-picture/"+this.sProfileName},getIconClass:function(e){return void 0===e&&(e=this.sType),"undefined"!=typeof this.oIconClass[e]&&this.oIconClass[e]},setTapReduce:function(){var e=this.getRender(!1,!0);if(!1!==e){this.touch_started=!1;var t=this;return $(e).on("touchstart",function(){t.touch_started=Date.now()}),$(e).on("touchend",function(e){if(!t.touch_started)return!1;0===$(e.target).closest("a, button").length&&Date.now()-t.touch_started<100&&(e.preventDefault(),t.xMsgManager.toggleOpening(!1)),t.touch_started=!1}),!0}},setCallbackFunc:function(){var e=this.getDivContent();if(!1!==e){var t=this,n=this.getRender();this.bHasCallbackFunc?xv.dom.addClass(n,"has-callback"):xv.dom.removeClass(n,"has-callback"),xv.dom.addEventListener(e,"click",function(){t.execCallbackFunc()})}},execCallbackFunc:function(){var e;if("string"==typeof this.fCallback){if(aArgs=this.fCallback.split("."),0===aArgs.length)return this.fCallback=!1,void(this.bHasCallbackFunc=!1);e=window;for(var t in aArgs){var n=aArgs[t];if("object"!=typeof e[n]&&"function"!=typeof e[n])break;e=e[n]}}else e=this.fCallback=!1;this.fCallback="function"==typeof e&&e,this.bHasCallbackFunc=!1!==this.fCallback,this.bHasCallbackFunc?this.fCallback():this.xMsgManager.toggleOpening(!1)},isInPage:function(){return!!this.bInPage},getInPageElem:function(){return document.getElementById(this.sId)||!1}};var t=function(){if(this.$Container=document.getElementById("page"),this.$Container||(this.$Container=document.body),!this.$Container)return!1;this.bNotificationsInPage="social_notifications"===xv.conf.data.action&&xv.conf.data.notifications.length>0,this.bNotificationSettingsInPage="social_notifications"===xv.conf.data.action,this.oMsgsById={},this.iMsgIdCount=0,this.iLastNewInPageCount=0,this.bToggleBtnAdded=!1,this.bOpened=!1,this.bPartiallyOpened=!1,this.bNotificationsEnabled=!1,this.iVisibilityCheck=!1,this.aToggleCallbacks=[],this.oCookieExpiration={},this.aAddedNotifIds=[],this.aMsgsToDelete=[],this.bMessagesLoadedFromChat=!1,this.iNotifsNotLoaded=!1,this.iNotifsUnviewed=!1,this.iAllMenuId=!1;var e=this;this.bPartiallyOpened||"undefined"==typeof window.xv.menus||"function"!=typeof window.xv.menus.addClose||(this.iAllMenuId=window.xv.menus.addClose(function(){e.bPartiallyOpened||e.toggleOpening(!1,{bUnreadNoUpdate:!0})})),this.$InPageReloadBtn=!1,this.$InPageDeleteAll=!1,this.isInPage()&&(this.$InPageReloadBtn=document.getElementById("account-notifications-reload"),this.$InPageReloadBtn&&xv.dom.addEventListener(this.$InPageReloadBtn,"click",function(){e.addNotifCountsMsgs()}),this.$InPageDeleteAll=document.getElementById("account-notifications-delete-all"),this.$InPageDeleteAll&&xv.dom.addEventListener(this.$InPageDeleteAll,"click",function(){e.delAllClosableNotifs()})),this.isSettingsInPage()&&this.getSettingsBtn()};t.prototype={initXMsg:function(t){if("string"==typeof t)t={c:t};else if("object"!=typeof t)return!1;var n=t.id;if(t.bInPage){var i=document.getElementById("account-notification-"+t.h.toString())||!1;i&&i.id&&(t.id=n=i.id)}"string"==typeof n&&0!==n.length||"string"==typeof n&&0!==n.length||(this.iMsgIdCount++,t.id=n="msg-mngr-"+this.iMsgIdCount),t.xmm=this;var s=new e(t);return s.isNotif()&&("number"==typeof this.iNotifsNotLoaded&&this.iNotifsNotLoaded>0&&this.iNotifsNotLoaded--,(s.isViewed()||!s.isUnread())&&"number"==typeof this.iNotifsUnviewed&&this.iNotifsUnviewed>0&&this.iNotifsUnviewed--),this.oMsgsById[n]=s,this.updateToggleBtn(),this.initUpdateViewedStatusCheck(),this.oMsgsById[n]},initXMsgs:function(e,t){var n=xv.cookies.get("hide_xmsg"),i=[],s=0;if("string"==typeof n)for(i=n.split(","),s=0;s<i.length;s++)"string"==typeof(n=i[s])&&(i[s]=n.split(":")[0]);for(s=0;s<e.length;s++){var o=e[s];"string"==typeof o.h&&-1!==i.indexOf(o.h)&&(o.r=!0),o.bInPage=!!t,this.initXMsg(o)}},addNotifCountsMsgs:function(){this.$InPageReloadBtn&&(this.$InPageReloadBtn.style.display="none");for(var e=this.getAllNotifCount(),t=this.getNotifMsgContainer(),n=0;n<e.length;n++){var i=e[n],s=i.getRender();t.firstElementChild?t.insertBefore(s,t.firstElementChild):t.appendChild(s),i.setAdded()}this.saveAsRead(e)},getById:function(e,t){var n=this.oMsgsById[e];return!(void 0===n||!0===n.isDeleted()&&!0!==t||!0===n.isLoader()&&!0!==t||!this.bNotificationsEnabled&&!0===n.isNotif()&&!1===n.isInPage()&&!0!==t)&&n},getAll:function(e){var t=[];for(var n in this.oMsgsById){var i=this.getById(n,e);i&&t.push(i)}return t},getAllSysMsg:function(e){var t=[];for(var n in this.oMsgsById){var i=this.getById(n,e);!i||i.isNotif()||i.isLoader()||t.push(i)}return t},getAllClosable:function(e){for(var t=this.getAll(e),n=[],i=0;i<t.length;i++){var s=t[i];s.isClosable()&&n.push(s)}return n},getAllClosableNotifs:function(e){for(var t=this.getAll(e),n=[],i=0;i<t.length;i++){var s=t[i];s.isClosable()&&s.isNotif()&&n.push(s)}return n},getAllClosableIds:function(e){for(var t=this.getAllClosable(e),n=[],i=0;i<t.length;i++){var s=t[i];n.push(s.sId)}return n},getAllClosableNotifsIds:function(e){for(var t=this.getAllClosableNotifs(e),n=[],i=0;i<t.length;i++){var s=t[i];n.push(s.sId)}return n},getAllNotif:function(e){for(var t=this.getAll(e),n=[],i=0;i<t.length;i++){var s=t[i];s.isNotif()&&n.push(s)}return n},getAllNotifCount:function(e){for(var t=this.getAll(e),n=[],i=0;i<t.length;i++){var s=t[i];s.isNotifCountOnly()&&n.push(s)}return n},hasClosableMsg:function(e){for(var t=this.getAll(e),n=0;n<t.length;n++){if(t[n].isClosable())return!0}return!1},getByHash:function(e,t){var n=this.getAll(t);e=e.toString();for(var i in n){var s=n[i];if(s.getHash()===e)return s}return!1},delByHash:function(e){var t=this.getByHash(e,!0);t&&t.sId&&this.delById(t.sId)},delById:function(e){this.delByIds([e])},delByIds:function(e,t){for(var n=[],i=0;i<e.length;i++){var s=this.getById(e[i]);s&&((s.isClosable()||s.isInPage())&&n.push(s),this.aMsgsToDelete.push(s))}var o=this;this.startDeletingMsgList(function(){o.saveAsRead(n),o.updateToggleBtn(),o.updateInPage(),"function"==typeof t&&t()})},delAllClosable:function(e){this.delByIds(this.getAllClosableIds(),e)},delAllClosableNotifs:function(e){var t=this;xv.utils.contextual_popup.confirm(xv.i18n.__("chat.delete_all_messages"),function(){t.delByIds(t.getAllClosableNotifsIds(),e)})},startDeletingMsgList:function(e){if(0===this.aMsgsToDelete.length)return void("function"==typeof e&&e());var t=this;this.aMsgsToDelete.pop()"delete",setTimeout(function(){t.startDeletingMsgList(e)},40)},updateViewedStatus:function(){if(0===this.countUnviewed(!0))return this.clearUpdateViewedStatusCheck(),!1;var e=this.getAll(),t=[];for(var n in e)!e[n].isViewed()&&e[n].hasBeenWatched()&&t.push(e[n]);t.length>0&&(this.setAllToViewed(t),this.updateAllRenders())},initUpdateViewedStatusCheck:function(){if(this.clearUpdateViewedStatusCheck(),this.isOpened()){var e=this;this.countUnviewed()>0&&(this.iVisibilityCheck=setInterval(function(){e.updateViewedStatus()},500))}},clearUpdateViewedStatusCheck:function(){!1!==this.iVisibilityCheck&&(clearInterval(this.iVisibilityCheck),this.iVisibilityCheck=!1)},setAllToViewed:function(e){"object"!=typeof e&&(e=this.getAll());var t=[];for(var n in e)e[n].isViewed()||e[n].setViewed(),e[n].isUnread()&&t.push(e[n]);this.saveAsRead(t)},saveAsRead:function(e){if(!(e.length<1)){var t="";for(var n in e)oMsg=e[n],oMsg.isUnread()&&(t+="msgid[]="+oMsg.getReadId()+"&",oMsg.setAsRead()),oMsg.setViewed(!0);if(""!==t){var i=xv.utils.createRequestObject();i.withCredentials=!0,i.open("POST","/account/message-closed",!0),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.send(t)}}},setAsDeleted:function(e,t){if(!(e.length<1)){var n="send_res=1";for(var i in e)oMsg=e[i],n+="&msgid[]="+oMsg.getDeleteId(),oMsg.setAsRead(),oMsg.setViewed(!0);if("send_res=1"!==n){var s=xv.utils.createRequestObject();s.withCredentials=!0,s.open("POST","/account/message-closed",!0),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onreadystatechange=function(){if(4===s.readyState&&200===s.status&&s.response&&"function"==typeof t)try{var e="object"==typeof s.response?s.response:"string"==typeof s.response?JSON.parse(s.response):null;t(e)}catch(n){console.error(n,s)}},s.send(n)}}},showPreview:function(e){if(this.isOpened()||this.isInPage())return!1;var t=this.getById(e),n=this.getMsgContainer(),i=this.getPreviewMsgContainer();if(!t||!t.isNotif())return!1;"function"==typeof window.navigator.vibrate&&window.navigator.vibrate(100),xv.dom.addClass(n,"preview");var s=xv.dom.getChildren(i);s.length>0?i.insertBefore(t.getRender(!1,!0),s[0]):i.appendChild(t.getRender(!1,!0)),t.setPreview(!0)},hasPreview:function(){aMsgs=this.getAll();for(var e in aMsgs)if(aMsgs[e].isPreview())return!0;return!1},emptyPreviewContainer:function(){var e=this.getMsgContainer(),t=this.getAll();xv.dom.removeClass(e,"preview");for(var n in t)t[n].isPreview()&&t[n].removePreview();this.updateMsgContainer()},getLastAddedNotifMsg:function(){return 0!==this.aAddedNotifIds.length&&this.getById(this.aAddedNotifIds[0])},addToAddedNotifIds:function(e){this.removeFromAddedNotifIds(e),this.aAddedNotifIds.unshift(e)},removeFromAddedNotifIds:function(e){for(var t=0;t<this.aAddedNotifIds.length;t++)this.aAddedNotifIds[t]===e&&this.aAddedNotifIds.splice(t,1);return!1},count:function(e,t){if(!0!==e&&!0!==t){var n=this.getAll().length;return isNaN(n)?0:n}var i=this.getAll(),s=0;for(var o in i)(!0===t?!0===i[o].isNotifCountOnly():!0===i[o].isNotif())&&s++;return s},countTotal:function(){var e=this.count();return this.bNotificationsEnabled?"number"==typeof this.iNotifsNotLoaded&&(e+=this.iNotifsNotLoaded):e-=this.count(!0),e},countUnviewed:function(e){var t=this.getAll(),n=0,i=0;for(var s in t){var o=t[s];o.isInPage()||!1!==o.isViewed()||(n++,!0===o.isNotif()&&i++)}return this.bNotificationsEnabled?e||"number"!=typeof this.iNotifsUnviewed||(n+=this.iNotifsUnviewed):n-=i,n},createChatLoader:function(){var e=this.getById("message_spinner_from_chat",!0);if(e)return void(e.isDeleted()&&e.unDelete());this.initXMsg({id:"message_spinner_from_chat",c:'',r:!0,bLoader:!0})},removeChatLoader:function(){var e=this.getById("message_spinner_from_chat",!0);e&&e"delete"},loadMessagesFromChat:function(){this.bMessagesLoadedFromChat||"function"==typeof window.xv.get_messages_from_chat&&(this.isInPage()||this.createChatLoader(),window.xv.get_messages_from_chat())},getToggleBtn:function(){return this.createToggleBtn(),this.$ToggleBtn},createToggleBtn:function(){if("undefined"==typeof this.$ToggleBtn){var e=document.createElement("button");e.id="x-x-messages-btn",e.setAttribute("type","button");var t=document.createElement("span");t.className="ic",e.appendChild(t);var n=document.createElement("span");n.className="icon-f icf-bell",n.setAttribute("title",xv.utils.unescape(xv.i18n.("messages.from_site",{"%site%":1===xv.utils.getSiteId()?xv.conf.dyn.is_premium?"Xvideos RED":"Xvideos.com":xv.conf.dyn.is_premium?"XNXX GOLD":"XNXX.com"}))),t.appendChild(n),this.$ToggleBtnBadge=document.createElement("span"),this.$ToggleBtnBadge.className="badge",e.appendChild(this.$ToggleBtnBadge);var i=this;xv.dom.addEventListener(e,"click",function(){i.toggleOpening()}),this.$ToggleBtn=e}},addToggleBtn:function(){if(!0===this.bToggleBtnAdded)return!1;this.$Container.appendChild(this.getToggleBtn()),this.bToggleBtnAdded=!0},removeToggleBtn:function(){if(!0!==this.bToggleBtnAdded)return!1;this.bToggleBtnAdded=!1,this.toggleOpening(!1),this.$Container.removeChild(this.getToggleBtn())},updateToggleBtn:function(){var e=this.countTotal();if(0===e||isNaN(e))return void this.removeToggleBtn();this.addToggleBtn(),this.updateToggleBtnBadge(),this.isOpened()?xv.dom.addClass(this.getToggleBtn(),"opened"):xv.dom.removeClass(this.getToggleBtn(),"opened")},updateToggleBtnBadge:function(){if(!0!==this.bToggleBtnAdded)return!1;var e=this.countUnviewed();this.$ToggleBtnBadge.innerHTML=e,this.$ToggleBtnBadge.style.display=e>0?"inline-block":"none"},setNextToChat:function(){var e=this.getToggleBtn(),t=this.getMsgContainer(),n=this.getMsgMenu();xv.dom.addClass(e,"chat-window-side"),xv.dom.addClass(t,"chat-window-side"),xv.dom.addClass(n,"chat-window-side")},addToggleCallback:function(e){"function"==typeof e&&this.aToggleCallbacks.push(e)},isOpened:function(e){return this.bOpened&&(!0===e||!this.bPartiallyOpened||0===this.count(!0))},toggleOpening:function(e,t){var n=!!t&&!!t.bPartial,i=!!t&&!!t.bUnreadOnly,s=!!t&&!!t.bUnreadNoUpdate;if(this.emptyPreviewContainer(),"boolean"!=typeof e)e=!this.isOpened();else if(e===this.bOpened&&this.bPartiallyOpened===!!n)return;if(!0==!!i){var o=!1,a=this.getAll();for(var d in a){var r=a[d];if(!(r.isViewed()||r.isNotif()&&!0!=!!n)){o=!0;break}}if(!1===o)return}var l=this.getMsgContainer();this.bOpened=e;var c=this;if(this.bOpened)this.bNotificationsInPage||this.loadMessagesFromChat(),this.initUpdateViewedStatusCheck(),this.bPartiallyOpened=!!n,this.updateMsgContainer(),this.bPartiallyOpened||"undefined"==typeof window.xv.menus||"function"!=typeof window.xv.menus.closeAll||window.xv.menus.closeAll(this.iAllMenuId),"function"==typeof $?$(l).slideDown("fast",function(){$(l).addClass("opened"),c.bPartiallyOpened||$("body").addClass("x-messages-opened"),c.updateAllRenders()}):xv.dom.addClass(l,"opened");else{this.isSettingsInPage()||this.toggleSettings(!1),this.clearUpdateViewedStatusCheck();var g=[],h=0,u=Math.round((new Date).getTime()/1e3);for(var f in this.oCookieExpiration)g.push(f+":"+(u+parseInt(this.oCookieExpiration[f]))),h=Math.max(0,this.oCookieExpiration[f]);xv.cookies.setLocal("hide_xmsg",g.join(","),1e3h,"/"),s||(this.bPartiallyOpened?this.setAllToViewed(this.getAllSysMsg()):this.setAllToViewed()),"function"==typeof $?$(l).slideUp("fast",function(){$(l).removeClass("opened"),$("body").removeClass("x-messages-opened"),c.updateAllRenders()}):xv.dom.removeClass(l,"opened")}for(var d in this.aToggleCallbacks)this.aToggleCallbacksd;"function"!=typeof $&&this.updateAllRenders()},getMsgContainer:function(){return this.createMsgContainer(),this.$MsgContainer},getPreviewMsgContainer:function(){return this.createMsgContainer(),this.$PreviewMsgContainer},getSysMsgContainer:function(){return this.createMsgContainer(),this.$SysMsgContainer},getNotifMsgContainer:function(){return this.createMsgContainer(),this.$NotifMsgContainer},createMsgContainer:function(){if("undefined"==typeof this.$MsgContainer){this.$MsgContainer=document.createElement("div"),this.$MsgContainer.id="x-messages",$MsgContainerBack=document.createElement("div"),$MsgContainerBack.id="x-messages-back",this.$MsgContainer.appendChild($MsgContainerBack),this.$MsgContainerScrollable=document.createElement("div"),this.$MsgContainerScrollable.id="x-messages-scrollable",this.$PreviewMsgContainer=document.createElement("div"),this.$PreviewMsgContainer.className="preview-container";var e=this,t=document.createElement("div");t.className="preview-overlay",xv.dom.addEventListener(t,"click",function(){e.toggleOpening(!0)}),this.$PreviewMsgContainer.appendChild(t),this.$MsgContainerScrollable.appendChild(this.$PreviewMsgContainer),this.$SysMsgContainer=document.createElement("div"),this.$MsgContainerScrollable.appendChild(this.$SysMsgContainer),this.isInPage()?this.$NotifMsgContainer=document.getElementById("account-notifications"):(this.$NotifMsgContainer=document.createElement("div"),$NotifTitle=document.createElement("p"),$NotifTitleIcon=document.createElement("span"),$NotifTitle.className="notif-sep",$NotifTitleIcon.className="icon-f icf-bell",$NotifTitle.appendChild($NotifTitleIcon),this.$NotifMsgContainer.appendChild($NotifTitle),this.$MsgContainerScrollable.appendChild(this.$NotifMsgContainer)),this.$MsgContainer.appendChild(this.$MsgContainerScrollable);var n=this.getToggleBtn();this.addToggleBtn(),n.parentNode.insertBefore(this.$MsgContainer,n),xv.dom.addEventListener($MsgContainerBack,"click",function(){e.toggleOpening(!1)}),xv.dom.addEventListener(this.$MsgContainerScrollable,"scroll",function(){e.updateMsgContainerScroll()}),this.updateToggleBtn()}},updateMsgContainer:function(){var e=this.getSysMsgContainer(),t=this.getNotifMsgContainer();if(!this.isOpened(!0))return xv.dom.addClass(e,"hidden"),void(this.isInPage()||xv.dom.addClass(t,"hidden"));xv.dom.removeClass(e,"hidden");var n=this;setTimeout(function(){n.updateMsgContainerScroll()},200);var i=this.getPreviewMsgContainer(),s=this.getAll(),o=this.count(!0);this.isInPage()||(0!==o&&!this.bPartiallyOpened&&this.isOpened()&&this.bNotificationsEnabled?xv.dom.removeClass(t,"hidden"):xv.dom.addClass(t,"hidden")),this.bNotificationsEnabled?xv.dom.removeClass(i,"hidden"):xv.dom.addClass(i,"hidden");var a=!0,d=!1;for(var r in s){var l=s[r];if(!l.isInPage())if(l.isAdded())l.updateRender(),l.isNotif()?d=!0:a=!1;else if(l.isNotif()){if(!this.bPartiallyOpened){var c=this.getLastAddedNotifMsg(),g=l.getRender();c?t.insertBefore(g,c.getRender()):t.appendChild(g),l.setAdded(),d=!0}}else e.appendChild(l.getRender()),l.setAdded(),a=!1}var h=this.getMsgContainer();!0===a&&!0===d?xv.dom.addClass(h,"notif-only"):xv.dom.removeClass(h,"notif-only")},updateMsgContainerScroll:function(){var e=this.getMsgContainer();if(!isNaN(this.$MsgContainerScrollable.scrollHeight)){if(this.$MsgContainerScrollable.scrollHeight<=this.$MsgContainerScrollable.offsetHeight)return xv.dom.removeClass(e,"can-scroll-top"),void xv.dom.removeClass(e,"can-scroll-bottom");if(0===this.$MsgContainerScrollable.scrollTop)return xv.dom.removeClass(e,"can-scroll-top"),void xv.dom.addClass(e,"can-scroll-bottom");xv.dom.addClass(e,"can-scroll-top"),this.$MsgContainerScrollable.offsetHeight+this.$MsgContainerScrollable.scrollTop>=this.$MsgContainerScrollable.scrollHeight?xv.dom.removeClass(e,"can-scroll-bottom"):xv.dom.addClass(e,"can-scroll-bottom")}},updateInPage:function(){if(!this.isInPage())return!1;if(this.$InPageDeleteAll){this.getAllNotif().length>0?"function"==typeof $?$(this.$InPageDeleteAll).is(":visible")||$(this.$InPageDeleteAll).fadeIn():this.$InPageDeleteAll.style.display="inline-block":"function"==typeof $?$(this.$InPageDeleteAll).is(":visible")&&$(this.$InPageDeleteAll).fadeOut():this.$InPageDeleteAll.style.display="none"}var e=this.count(null,!0);if(e!==this.iLastNewInPageCount){if(this.iLastNewInPageCount=e,e<1)return void(this.$InPageReloadBtn&&(this.$InPageReloadBtn.style.display="none"));$NewNotifsCount=document.getElementById("account-notifications-new-count"),xv.dom.addClass($NewNotifsCount,"updated"),setTimeout(function(){xv.dom.removeClass($NewNotifsCount,"updated")},1e3),$NewNotifsCount.innerHTML=e,this.$InPageReloadBtn&&("function"==typeof $?$(this.$InPageReloadBtn).is(":visible")||$(this.$InPageReloadBtn).fadeIn():this.$InPageReloadBtn.style.display="block")}},getMsgMenu:function(){return this.createMsgMenu(),this.$MsgMenu},createMsgMenu:function(){if("undefined"==typeof this.$MsgMenu){this.$MsgMenu=document.createElement("div"),this.$MsgMenu.id="x-messages-menu";var e=this,t=document.createElement("button");t.setAttribute("type","button"),t.setAttribute("title",xv.utils.unescape(xv.i18n.("misc.reduce")));var n=document.createElement("span");n.className="icon-f icf-angle-down",t.appendChild(n),xv.dom.addEventListener(t,"click",function(){e.toggleOpening(!1)}),this.isSettingsInPage()||($SettingsBtn=this.getSettingsBtn(),this.$MsgMenu.appendChild($SettingsBtn),"function"==typeof window.xv.get_messages_from_chat&&($SeeAll=document.createElement("a"),$SeeAll.setAttribute("href","/account/my-notifications"),$SeeAll.className="btn",$SeeAll.innerHTML=xv.i18n.("misc.see_all"),this.$MsgMenu.appendChild($SeeAll))),this.$MsgMenu.appendChild(t);var i=this.getToggleBtn();this.addToggleBtn(),i.parentNode.insertBefore(this.$MsgMenu,i),this.updateToggleBtn()}},updateMsgMenu:function(){var e=this.getMsgMenu();return this.isOpened(!0)?("function"==typeof $?$(e).hasClass("opened")||$(e).slideDown("fast",function(){$(e).addClass("opened")}):xv.dom.addClass(e,"opened"),this.hasMsgMenuSetting()?xv.dom.addClass(e,"has-settings"):xv.dom.removeClass(e,"has-settings"),this.isOpened()?(xv.dom.removeClass(e,"partially"),void(this.hasClosableMsg()?xv.dom.addClass(e,"has-closable"):xv.dom.removeClass(e,"has-closable"))):(xv.dom.removeClass(e,"has-closable"),void xv.dom.addClass(e,"partially"))):("function"==typeof $?$(e).slideUp("fast",function(){$(e).removeClass("opened")}):xv.dom.removeClass(e,"opened"),void(this.isSettingsInPage()||this.toggleSettings(!1)))},toggleSettings:function(e){if(!1!==e&&"undefined"!=typeof xv&&"undefined"!=typeof xv.settings_btn&&"function"==typeof xv.settings_btn.openChatSettings&&!this.bSettingsOpened)return void xv.settings_btn.openChatSettings();if("boolean"!=typeof e)e=!this.bSettingsOpened;else if(e===this.bSettingsOpened)return;this.bSettingsOpened=e;var t=this.getSettings();this.bSettingsOpened?("function"==typeof $?$(t).slideDown("fast",function(){$(t).addClass("opened")}):xv.dom.addClass(t,"opened"),xv.dom.addClass(this.$SettingsBtn,"opened")):(xv.dom.removeClass(t,"opened"),"function"==typeof $?$(t).slideUp("fast",function(){$(t).removeClass("opened")}):xv.dom.removeClass(t,"opened"),xv.dom.removeClass(this.$SettingsBtn,"opened"))},getSettingsBtn:function(){if("undefined"!=typeof this.$SettingsBtn)return this.$SettingsBtn;if(this.isSettingsInPage()&&($SettingsBtn=document.getElementById("account-notifications-settings"),$SettingsBtn&&(this.$SettingsBtn=$SettingsBtn)),"undefined"==typeof this.$SettingsBtn){this.$SettingsBtn=document.createElement("button"),this.$SettingsBtn.className="settings-btn btn btn-default",this.$SettingsBtn.setAttribute("type","button"),this.$SettingsBtn.setAttribute("title",xv.utils.unescape(xv.i18n._("misc.settings")));var e=document.createElement("span");e.className="icon-f icf-cog",this.$SettingsBtn.appendChild(e)}var t=this;return xv.dom.addEventListener(this.$SettingsBtn,"click",function(e){e=e||window.event,"function"==typeof e.preventDefault?e.preventDefault():e.returnValue=!1,t.toggleSettings()}),this.$SettingsBtn},getSettings:function(){return this.updateSettings(),this.$Settings},updateSettings:function(){if(this.createSettings(),"undefined"!=typeof this.aSettings&&("undefined"==typeof this.iLastSettingsUpdate||this.iLastSettingsUpdate!==this.aSettings.length)){this.iLastSettingsUpdate=this.aSettings.length;for(var e=0;e<this.aSettings.length;e++){var t=this.aSettings[e];if(!t.bAdded){t.bAdded=!0;var n=document.createElement("button");n.className="btn btn-default",
n.setAttribute("type","button"),n.innerHTML=t.sTitle,xv.dom.addEventListener(n,"click",t.fAction),this.$Settings.appendChild(n)}}}},createSettings:function(){if("undefined"==typeof this.$Settings){this.$Settings=document.createElement("div"),this.$Settings.id="x-messages-menu-settings",this.isSettingsInPage()&&(this.$Settings.className="is-in-page");var e=this,t=document.createElement("button");t.className="close",t.setAttribute("type","button");var n=document.createElement("span");n.className="icon-f icf-close-thin",t.appendChild(n),xv.dom.addEventListener(t,"click",function(){e.toggleSettings(!1)}),this.$Settings.appendChild(t);var i=document.createElement("p");i.className="title";var s=document.createElement("span");s.className="icon-f icf-cog",i.appendChild(s);var o=document.createTextNode(" "+xv.utils.unescape(xv.i18n.__("misc.settings"))+" ");i.appendChild(o),this.$Settings.appendChild(i);var a=!1;if(this.isSettingsInPage()&&($ActionsContainer=document.getElementById("account-notifications-actions"),$ActionsContainer&&($ActionsContainer.append(this.$Settings),a=!0)),!1===a){var d=this.getToggleBtn();this.addToggleBtn(),d.parentNode.insertBefore(this.$Settings,d)}this.updateToggleBtn()}},addAMsgMenuSetting:function(e,t){"undefined"==typeof this.aSettings&&(this.aSettings=[]),this.aSettings.push({sTitle:e,fAction:t,bAdded:!1})},hasMsgMenuSetting:function(){return"undefined"!=typeof this.aSettings&&!this.isSettingsInPage()&&this.aSettings.length>0},isInPage:function(){return!!this.bNotificationsInPage},isSettingsInPage:function(){return!!this.bNotificationSettingsInPage},registerHash:function(e,t){this.oCookieExpiration[e]=t||1296e3},updateAllRenders:function(){this.updateToggleBtn(),this.updateMsgContainer(),this.updateMsgMenu(),this.updateInPage()},setNotificationFeatureEnabled:function(e){this.isInPage()?this.bNotificationsEnabled=!1:this.bNotificationsEnabled=!!e,this.updateAllRenders()}};var n=new t,i={};window.xv.messages={registerOnToggle:function(e){n&&"function"==typeof n.addToggleCallback&&n.addToggleCallback(e)},xmmDelById:function(e){n&&"function"==typeof n.delById&&n.delById(e)},xmmDelByHash:function(e){n&&"function"==typeof n.delByHash&&n.delByHash(e)},updateAjaxTabMessages:function(){var e=document.getElementById("x-ajax-tab-messages");e&&new o(e)},addXMessageSetting:function(e,t){if(!n)return!1;n.addAMsgMenuSetting(e,t)},setMessageNextToChat:function(){n&&(n.setNextToChat(),n.loadMessagesFromChat())},removeChatLoader:function(){if(!n)return!1;n.removeChatLoader()},setNotificationFeatureEnabled:function(e){if(!n)return!1;n.setNotificationFeatureEnabled(e)},addMessageFromChat:function(e,t){if("object"!=typeof e||"object"!=typeof n||"function"!=typeof n.initXMsg)return!1;n.removeChatLoader(),e.n=!0,e.bInPage=n.isInPage();var i=n.initXMsg(e);n.updateAllRenders(),!n.isOpened()&&i&&(t?n.toggleOpening(!0):n.showPreview(i.sId))},setMessagesFromChat:function(e){if(!n)return!1;if(n.removeChatLoader(),"object"==typeof e)for(var t in e)"undefined"!=typeof e[t].h&&n.delByHash(e[t].h),e[t].bInPage=n.isInPage(),n.initXMsg(e[t]);n.bMessagesLoadedFromChat=!0,n.updateAllRenders()},setMessagesCountsFromChat:function(e){if(n.removeChatLoader(),"undefined"==typeof e.count||"undefined"==typeof e.count_unread||!n||void 0!==n&&n.bMessagesLoadedFromChat)return!1;isNaN(parseInt(e.count))||(n.iNotifsNotLoaded=parseInt(e.count)),isNaN(parseInt(e.count_unread))||(n.iNotifsUnviewed=parseInt(e.count_unread)),n.updateToggleBtn(),n.isOpened()&&n.loadMessagesFromChat()},setGenericMessage:function(e,t){if(!n)return!1;n.removeChatLoader(),t&&n.toggleOpening(!0,{bPartial:!0}),"object"==typeof e&&n.initXMsg(e),n.updateAllRenders()},xmmHTMLDelById:function(e){var t=i[e];if(void 0===t||"function"!=typeof t["delete"])return!1;t"delete"}},xv.conf&&("undefined"!=typeof xv.conf.dyn.xmsg&&xv.conf.dyn.xmsg.length>0&&(n.initXMsgs(xv.conf.dyn.xmsg),n.toggleOpening(!0,{bPartial:!0,bUnreadOnly:!0})),n.isInPage()&&"undefined"!=typeof xv.conf.data.notifications&&xv.conf.data.notifications.length>0&&n.initXMsgs(xv.conf.data.notifications,!0));var s=function(e){this.$Msg=e;var t=xv.dom.getChildren(this.$Msg),n=this;for(var s in t){var o=t[s];if(xv.dom.hasClass(o,"del")){var a;if(!(a=o.dataset?o.dataset.id:o.getAttribute("id")))return void o.parentNode.removeChild(o);this.sCloseId=a,i[a]=this,xv.dom.addEventListener(o,"click",function(e){e=e||window.event,"function"==typeof e.preventDefault?e.preventDefault():e.returnValue=!1,n"delete"})}}};s.prototype={"delete":function(){var e=xv.utils.createRequestObject();e.withCredentials=!0,e.open("POST","/account/message-closed",!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send("msgid[]="+this.sCloseId),this.$Msg.parentNode.removeChild(this.$Msg),"undefined"!=typeof i[this.sCloseId]&&delete i[this.sCloseId]}};var o=function(e){this.$Container=e,this.$ContainerInner=xv.dom.getFirstChild(this.$Container);var t=xv.dom.getChildren(this.$ContainerInner);for(var n in t){var i=t[n];xv.dom.hasClass(i,"x-message")&&new s(i)}},a=document.getElementById("x-home-messages");a&&new o(a);var d=document.getElementById("x-red-home-messages");d&&new o(d)}(),function(){var e={};e.menu={id:"mobile-menu",icon_cls:"vertical"},e.filters={id:"mobile-filters-menu",icon_cls:"opened"};var t="xv-search-form",n="mobile-hide",i=!1;if(xv&&xv.conf&&xv.conf.data&&"main"===xv.conf.data.action){var s=document.getElementById("home-mobile-search");s&&"string"==typeof s.tagName&&(t="home-mobile-search",n="no-nothing",i=!0)}if(e.search={id:t,hide_class:n,icon_cls:"close",dontScrollToTop:!0,onclose_func:function(){if(i){$("#"+t+" input[type=text]").first().focus(),$("html,body").animate({scrollTop:0},400)}else window.jQuery&&$("#header .white-stripe").removeClass("isForcedFixedPosition")},onopen_func:function(e){if(window.jQuery){var n=$("#"+t+" input[type=text]").first(),s=$("#header .white-stripe"),o=s.length&&"fixed"===s.css("position");if(n.focus(),!i&&o)return s.addClass("isForcedFixedPosition"),!1;var a=$("#"+t).offset().top-(o?s.outerHeight():0);return $(window).width()>$(window).height()&&$(window).scrollTop()<a&&$("html,body").animate({scrollTop:a},400),i&&e.toggle(!1),!1}xv.dom.scrollToTop()}},xv.mobile.menus_init(e),xv.header&&(xv.header.$nav=document.getElementById("nav"),xv.header.$nav)){xv.header.oNavVars={$menuToggle:document.getElementById("header-menu-toggle"),$mainGenderCatsBtn:document.getElementById("nav-main-cat-switcher-btn"),$mainCatBtn:document.getElementById("main-cats-sub-list-btn")};var o,a={},d=[],r=!1,l=!1,c=0,g=-1,h=function(){for(var e in a)u(e)},u=function(e){!1===a[e].bIsInit&&(a[e].bIsInit="processing",a[e].$list&&a[e].$btn?xv.dom.addEventListener(a[e].$btn,"click",function(){toggle_sub_menu(e)}):a[e].bDisabled=!0,a[e].bIsInit=!0)},f=function(){if(!0===r)return!1;r=!0;for(var e=0;e<d.length;e++){var t=d[e];"function"==typeof t&&t()}d=[]},v=function(e){o=!1;for(var t in a)a[t].bIsOpened=!1;xv.header.update_menu_classs()},p=function(e){f(),o=!0,xv.menus.closeAll(g);var t="string"==typeof l;for(var n in a)!0===a[n].bIsOpened&&(t=!1);!0===t&&(a[l].bIsOpened=!0),xv.header.update_menu_classs()},m=function(e){if(a[e].bIsOpened)return xv.header.update_menu_classs(),void("function"==typeof a[e].already_opened_func&&a[e].already_opened_func());for(var t in a)a[t].bIsOpened=!1;a[e].bIsOpened=!0,xv.header.update_menu_classs()};close_sub_menu=function(e){a[e].bIsOpened=!1,xv.header.update_menu_classs()},toggle_sub_menu=function(e){a[e].bIsOpened?close_sub_menu(e):m(e)},xv.header.add_sub_menu=function(e,t,n,i,s,o){if(e&&t){var d={$btn:e,$list:t,bIsOpened:!1,bDisabled:!1,bIsInit:!1};return c++,"string"!=typeof n&&(n="sub_menu"+c),o&&"function"==typeof o.already_opened_func&&(d.already_opened_func=o.already_opened_func),a[n]=d,(!1===l&&!1!==s||!0===s)&&(l=n),!0!==i&&h(),n}},xv.header.add_mobile_menu_init=function(e){r=!1,d.push(e),o&&f()},xv.header.is_menu_opened=function(){return window_resize_callback(!1),o},xv.header.is_sub_menu_opened=function(e){return!(!xv.header.is_menu_opened()||"undefined"==typeof a[e]||!a[e].bIsOpened)},xv.header.open_sub_menu=function(e){if(!e){if(!l)return!1;e=l}p(),m(e),"undefined"!=typeof window.xv&&"undefined"!=typeof window.xv.dom&&"function"==typeof window.xv.dom.scrollToTop&&window.xv.dom.scrollToTop()},xv.header.open_default_sub_menu=function(){xv.header.open_sub_menu()},xv.header.update_menu_classs=function(){xv.header.is_menu_opened()?(xv.dom.addClass(xv.header.$nav,"opened"),xv.dom.addClass(xv.header.oNavVars.$menuToggle,"opened"),xv.dom.addClass(document.body,"mobile-menu-opened")):(xv.dom.removeClass(xv.header.$nav,"opened forced-opened"),xv.dom.removeClass(xv.header.oNavVars.$menuToggle,"opened"),xv.dom.removeClass(document.body,"mobile-menu-opened"));for(var e in a)!0!==a[e].bDisabled&&(a[e].bIsOpened?(xv.dom.addClass(a[e].$btn,"opened"),xv.dom.addClass(a[e].$list,"opened")):(xv.dom.removeClass(a[e].$btn,"opened"),xv.dom.removeClass(a[e].$list,"opened")))},xv.header.update_sub_menu_btn=function(e,t){"undefined"!=typeof a[e]&&t&&(a[e].$btn=t,xv.dom.addEventListener(a[e].$btn,"click",function(){toggle_sub_menu(e)}))},xv.header.update_sub_menu_list=function(e,t){"undefined"!=typeof a[e]&&t&&(a[e].$list=t)},xv.header.oNavVars.$mainCatBtn&&xv.header.add_sub_menu(xv.header.oNavVars.$mainCatBtn,document.getElementById("main-cats-sub-list"),"main_cat",!0,!1),xv.header.oNavVars.$mainGenderCatsBtn&&xv.header.add_sub_menu(xv.header.oNavVars.$mainGenderCatsBtn,document.getElementById("nav-main-cat-switcher-list"),"main_gender_cats",!0,!1),h(),xv.header.update_menu_classs(),window_resize_callback(),xv.dom.addEventListener(window,"resize",xv.header.window_resize),xv.dom.addEventListener(xv.header.oNavVars.$menuToggle,"click",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,o?v():p()}),xv.dom.addClass(xv.header.oNavVars.$menuToggle,"init-ok"),g=xv.menus.addClose(function(){v()})}}();

""".

correct, ne?

no, your scripts all not working.

why we simply cannot remove that "default.footer.static.js" completely initially at before and after page load?

no effect. why theres no any in web browser about:config options to turn these auto-rollbacks off?

it does not utilising anchorings, it do it somehow differently. think how in firefox.

this is not working: history.scrollRestoration = "manual";
this is not working: layout.css.scroll-anchoring.enabled
this is not working: browser.sessionstore.restore_position
this is not working: general.smoothScroll

'original' is defined but never used.
Unexpected '–'.
Missing semicolon.
Unexpected '–'.
Missing semicolon.
'originalFocus' is defined but never used.

no effect, it uses jquery

no effect. no consoles.

it maybe simply autoscrolling back to element HTML on user's attempt to scrollout from it in "Y" through its height in overflow with some autoscrollage thing somewhere.

theres also nothing interesting in console except mousedown/mouseup press event on attempts to scroll vertical scrollbar through web page's height in overflow.

can we disable all events after pageload?

your dispath is bullsheet that does not functioning, and it listening all events and auto-scroll-rollbacks scrollbar. need superextreme all eventual termination protocol!!!

all your attempts is bullsheet!!!

then this garbage is not evendriven. think!

some one specific script from this site doing this inhuman rollbacks!:

"""


""".

no, mazafaka rolling back.

no, mazafaka rolling back.

theres obvious functions in that footer script that auto-rolling scrollbars to top, ne, right? then wtf do you doing!?:

"""

/* Built on 2023-06-20 07:45:00 */
!function(){var e=function(e,t,n){var i=document.getElementById("header-"+(t.is_desktop?"desktop-":"mobile-")+e+"-toggle");i&&(t.bIsOpened=!1,t.menu=document.getElementById(t.id),t.menu_toggler=i,t.toggle=function(i){if(void 0===i||i!==t.bIsOpened){if(i=!t.bIsOpened){window.xv.menus.closeAll(t.iAllMenuId);for(var s in n)s!==e&&n[s].bToggle&&n[s].toggle(!1);xv.dom.removeClass(t.menu,t.hide_class?t.hide_class:"mobile-hide"),xv.dom.addClass(t.menu_toggler,t.icon_cls),t.body_cls_onopen&&xv.dom.addClass(document.body,t.body_cls_onopen),t.dontScrollToTop||xv.dom.scrollToTop()}else xv.dom.addClass(t.menu,t.hide_class?t.hide_class:"mobile-

""".










in opening html tag it have tons of events and multiple for scroll:

function() {
t.banners.checkDisplayCallOnScroll()
}

function(e) {
n.checkPendingThumbToDisplay()
}

function(a) {
return "undefined" == typeof n || a && n.event.triggered === a.type ? void 0 : n.event.dispatch.apply(k.elem, arguments)
}







other events at html:

,window.addEventListener("beforeunload",function(){i.set("nb_tabs_opened",Math.max(i.ge


ow.addEventListener("beforeunload",function(t){e.saveForDurationReport()}),setIn


meStorage="user_theme_fav";var t=this,i=function(){"object"==typeof xv.disclaimer&&x




ocument.addEventListener("DOMContentLoaded",function(e){n.checkPendingThumbToDisplay(),window.addEventListener("scroll",function(e){n.checkPendingThumbToDisplay()})})}(),function(){function e(e){for(var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:








e("lib/helpers/events/tab",[],function(){function e(e){e=e||window.event;var o;if(o=e.type in r?r[e.type]:this[s]?"hidden":"visible",t!==o)if(t=o,"hidden"===o)for(var a in n)n[a]();else for(var a in i)i[a]()}var t,i=[],n=[],s="hidden",o="visible",a="hidden",r={focus:o,focu









grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&










you are like trolling ppl in chats or wtf are you doing? non of your anti-rollbacks functioning, robot!

you are like trolling ppl in chats or wtf are you doing? non of your anti-rollbacks functioning, robot!
where completescript?

The CSS overflow module properties enable you to handle scrollable overflow in visual media.

Overflow happens when the content in an element box extends past one or more of the box's edges. Scrollable overflow is the content that appears outside the element box for which you might want to add a scrolling mechanism. CSS overflow properties let you control what happens when content overflows an element box.

Painting effects that overflow the content but do not participate in the CSS box model do not affect layout. This type of overflow is also known as ink overflow. Examples of ink overflows include box shadows, border images, text decoration, overhanging glyphs, and outlines. Ink overflows do not extend the scrollable overflow region.
Overflow in action

Try the following example to see the effects of various overflow property values on the content overflow and scrollbars in the adjacent fixed-size box.

The example includes options to change the values for the overflow-clip-margin and width properties, as well as to programmatically scroll the content if the overflow property creates a scroll container. Select overflow: clip and see the effect of different overflow-clip-margin values. Select overflow: hidden or overflow: scroll to check out the various ScrollLeft and ScrollTop slider settings.

A link is included in the content box above to demonstrate the effects of keyboard focus on overflow and scroll behaviors. Try tabbing to the link or programmatically scrolling the content: the content will scroll only if the enumerated value creates a scroll container.
Reference
CSS properties

overflow shorthand
overflow-block
overflow-clip-margin
overflow-inline
overflow-x
overflow-y
scroll-behavior
scrollbar-gutter
text-overflow
-webkit-line-clamp


Note: The CSS overflow module level 4 introduces the block-ellipsis, continue, line-clamp, and max-lines properties. These have not yet been implemented.
Data types

<overflow> enumerated values


Guides

Learn: Overflowing content

Learn what overflow is and how to manage it.


Creating a named scroll progress timeline animation

The CSS scroll timeline scroll-timeline-name and scroll-timeline-axis properties, along with the scroll-timeline shorthand, create animations tied to the scroll offset of a scroll container.


Related concepts

scrollbar-width CSS property
scrollbar-color CSS property
scrollbar-gutter CSS property
scroll-behavior CSS property
scroll-margin CSS shorthand property
scroll-padding CSS shorthand property
scroll-snap-align CSS property
scroll-snap-stop CSS property
scroll-snap-type CSS property
text-overflow CSS property
::-webkit-scrollbar pseudo-element
scrollbar ARIA role
Element scroll() method
Element scrollBy() method
Element scrollIntoView() method
Element scrollTo() method
Element scrollTop property
Element scrollLeft property
Element scrollWidth property
Element scrollHeight property
Document scroll event
Scroll container glossary term
Ink overflow glossary term


not effect

not effect. you are clown, not an assistant.