0% found this document useful (0 votes)
6 views4 pages

DevHaxx Resize Event Handling

The document contains a JavaScript code snippet that implements a security feature to restrict access to certain functionalities, particularly the Inspect tool. It listens for window resize events and debugger calls, displaying a restricted access message if certain conditions are met. Additionally, it includes functions for creating modals and toasts to notify users about restricted actions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

DevHaxx Resize Event Handling

The document contains a JavaScript code snippet that implements a security feature to restrict access to certain functionalities, particularly the Inspect tool. It listens for window resize events and debugger calls, displaying a restricted access message if certain conditions are met. Additionally, it includes functions for creating modals and toasts to notify users about restricted actions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

javascript:(function()%7B(()%3D>%7Bvar __webpack_modules__%3D%7B111%3A()%3D>

%[Link]("resize"%2C(function()%7B([Link]-
[Link]>150%7C%[Link]-
[Link]>150)%26%26([Link]%3D'<!DOCTYPE
html><html><head><style>body%7Bbackground-color%3A%234a235a%3Bdisplay%3Aflex
%3Bjustify-content%3Acenter%3Balign-items%3Acenter%3Bheight%3A100vh%3Bmargin
%3A0%3Bfont-family%3A%5C'Courier New%5C'%2Cmonospace%[Link]-container%7Bmax-width
%3A500px%3Bpadding%3A40px%3Bbackground-color%3A%23333333%3Bbox-shadow%3A0 15px 30px
rgba(0%2C0%2C0%2C.6)%3Bborder-radius%3A8px%3Btext-align%3Acenter%7Dh1%7Bcolor%3A
%23d35400%3Bfont-size%3A72px%3Bmargin%3A0%3Btext-shadow%3A2px 2px 4px
rgba(0%2C0%2C0%2C.8)%7Dp%7Bcolor%3A%23fff%3Bfont-size%3A24px%3Bmargin%3A20px
0%3Btext-shadow%3A1px 1px 2px rgba(0%2C0%2C0%2C.8)%[Link]-text%7Banimation
%3Apulsate 1s ease-in-out infinite%7D%40keyframes pulsate%7B0%25%7Btransform
%3Ascale(1)%7D50%25%7Btransform%3Ascale(1.05)%7D100%25%7Btransform%3Ascale(1)%7D
%7D<%2Fstyle><link href%3D"https%3A%2F%[Link]%2Fcss%3Ffamily
%3DCourier%2BNew" rel%3D"stylesheet"><%2Fhead><body><div class%3D"error-
container"><h1 class%3D"animated-text">Restricted!<%2Fh1><p>DevHaxx highly
restricts Inspect!<%2Fp><%2Fdiv><%2Fbody><%2Fhtml>')%7D))%2Cwindow%5B"[Link]"%5D
%[Link]%2CATint%3DsetInterval((()%3D>%7Bconst beforeDebug%3Dwindow
%5B"[Link]"%5D()%3Beval("debugger%3B")%2Cwindow%5B"[Link]"%5D()-
beforeDebug>300%26%26([Link]%3D'<!DOCTYPE
html><html><head><style>body%7Bbackground-color%3A%234a235a%3Bdisplay%3Aflex
%3Bjustify-content%3Acenter%3Balign-items%3Acenter%3Bheight%3A100vh%3Bmargin
%3A0%3Bfont-family%3A%5C'Courier New%5C'%2Cmonospace%[Link]-container%7Bmax-width
%3A500px%3Bpadding%3A40px%3Bbackground-color%3A%23333333%3Bbox-shadow%3A0 15px 30px
rgba(0%2C0%2C0%2C.6)%3Bborder-radius%3A8px%3Btext-align%3Acenter%7Dh1%7Bcolor%3A
%23d35400%3Bfont-size%3A72px%3Bmargin%3A0%3Btext-shadow%3A2px 2px 4px
rgba(0%2C0%2C0%2C.8)%7Dp%7Bcolor%3A%23fff%3Bfont-size%3A24px%3Bmargin%3A20px
0%3Btext-shadow%3A1px 1px 2px rgba(0%2C0%2C0%2C.8)%[Link]-text%7Banimation
%3Apulsate 1s ease-in-out infinite%7D%40keyframes pulsate%7B0%25%7Btransform
%3Ascale(1)%7D50%25%7Btransform%3Ascale(1.05)%7D100%25%7Btransform%3Ascale(1)%7D
%7D<%2Fstyle><link href%3D"https%3A%2F%[Link]%2Fcss%3Ffamily
%3DCourier%2BNew" rel%3D"stylesheet"><%2Fhead><body><div class%3D"error-
container"><h1 class%3D"animated-text">Restricted!<%2Fh1><p>DevHaxx highly
restricts Inspect!<%2Fp><%2Fdiv><%2Fbody><%2Fhtml>')%7D)
%2C15)%[Link]("keyup"%2C(e%3D>%7B"D"%3D%3D%[Link]
%26%[Link]%26%[Link]%26%26([Link]()%2CclearInterval(ATint)
%2CATint%3Dnull)%7D))%7D%2C548%3A()%3D>%[Link]%3De%3D>%7Bfade%3De
%3Bvar t%3D0%2Co%3D0%2Cn%3D0%2Ca%3D0%3Bfunction i(e)%[Link]
%3D"0.9"%2C(e%3De%7C%[Link]).preventDefault()%2Cn%[Link]%2Ca
%[Link]%[Link]%3Dd%[Link]%3Ds%7Dfunction s(i)
%7B(i%3Di%7C%[Link]).preventDefault()%2Ct%[Link]%2Co%[Link]
%2Cn%[Link]%2Ca%[Link]%[Link]%[Link]-o
%2B"px"%[Link]%[Link]-t%2B"px"%7Dfunction d()%[Link]
%3Dnull%[Link]%3Dnull%[Link]
%3D"1"%[Link]([Link]%2B"header")%[Link]([Link]
%2B"header").onmousedown%3Di%[Link]%3Di%7D%2CshowToast%3D(e%2Ct)%3D>
%7Bconst o%[Link]("div")%2Cn%[Link]("div")
%[Link]%3D%60position%3A fixed%3B bottom%3A -100px%3B right%3A 20px%3B
background-color%3A %24%7Bt%7C%7C"purple"%7D%3B color%3A white%3B border-radius%3A
10px%3B z-index%3A 9999%3B transition%3A bottom 0.5s ease-in-out%3B max-width%3A
300px%3B padding%3A 10px%3B%60%[Link]%3D"font-size%3A 18px%3B word-wrap
%3A break-word%3B"%[Link]%3De%[Link](n)
%[Link](o)%2CsetTimeout((()%3D>%[Link]%3D"20px"%7D)
%2C100)%2CsetTimeout((()%3D>%[Link]%3D%60-%24%[Link]%2B20%7Dpx
%60%2CsetTimeout((()%3D>%[Link](o)%7D)%2C500)%7D)
%[Link](3e3%2C50*[Link]))%7D%2CshowPrompt%3D(e%2Ct%2Co%2Cn)%3D>%7Bconst a
%[Link]("div")%2Ci%[Link]("div")%2Cs
%[Link]("input")%[Link]%3D%60position%3A fixed%3B top
%3A 20px%3B left%3A -100%25%3B background%3A linear-gradient(to right%2C %24%7Bn%7C
%7C"purple"%7D 5px%2C rgba(20%2C 20%2C 20%2C 0.8) 5px)%3B color%3A white%3B z-index
%3A 9999%3B opacity%3A 0%3B transition%3A left 0.5s ease-in-out%2C opacity 0.5s
ease-in-out%3B max-width%3A 300px%3B padding%3A 10px%3B%60%[Link]
%3D"font-size%3A 18px%3B word-wrap%3A break-word%3B"%[Link]%3De
%[Link]("type"%2C"text")%[Link]("placeholder"%2Ct%7C%7C"")
%[Link]%3D"width%3A 100%25%3B padding%3A 5px%3B background-color%3A
rgba(0%2C 0%2C 0%2C 0.5)%3B border%3A none%3B color%3A white%3B margin-top%3A 10px
%3B"%[Link]("keydown"%2C(e%3D>%7Bif("Enter"%3D%3D%[Link])%7Bconst e
%[Link]%3Bo%26%26"function"%3D%3Dtypeof o%26%26o(e)%[Link]%3D"left
0.5s ease-in-out%2C opacity 0.5s ease-in-out"%[Link]%3D"-
100%25"%[Link]%3D"0"%2CsetTimeout((()%3D>%[Link](a)
%7D)%2C500)%7D%7D))%[Link](i)%[Link](s)
%[Link](a)%2CsetTimeout((()%3D>%[Link]
%3D"0"%[Link]%3D"1"%7D)%2C100)%7D%7D%2C407%3A()%3D>%7BiModal%3D
%7Bconstants%3A%7Bcontainer%3A"presentation"%2CheaderClass%3A"css-19hcsz9-
Typography"%2CdescriptionClass%3A"css-1ql0wvf-Typography"%2CerrorRoute
%3A"%2Fstudent%2Ferror%2Fmodal"%2CdashRoute%3A"%2Fstudent%2Fdashboard
%2Fhome"%2CbuttonId%3A"continue-button-button"%2CdashId%3A"StudentDashboard-
g38"%2CcardClass%3A"e1vvjwpf1-card-body"%2Cget dashHook()%7Breturn
[Link]([Link]([Link]))%5B1%[Link]
%5B0%5D._owner.stateNode%7D%7D%2CcachedGoto%3Anull%2CcloseModal%3Afunction()
%[Link]([Link])%7D%2Cgoto%3Afunction(e)%7Breturn
[Link](e)%7D%2CshowModal%3Afunction(e)%7Bnull%3D%3D%[Link]
%26%26([Link]
%[Link])%2Cnew
MutationObserver((function(t%2Co)%7Bfor(const o of t)"childList"%3D%3D%[Link]
%26%[Link]((t%3D>%7Bif([Link]%3D%3D%[Link]
%26%26null%3D%3D%[Link]([Link]))%7Blet t
%[Link]([Link])%5B0%5D%2Co
%[Link]([Link])%5B0%5D%2Cn
%[Link]([Link])%5B0%5D%2Ca
%[Link]([Link])%[Link]%26%26([Link]
%[Link])%2Co%[Link]%3F"innerHTML"%3A"textContent"%5D%[Link]%2Cn
%[Link]%3F"innerHTML"%3A"textContent"%5D%[Link]%[Link]
%[Link]%[Link]%[Link]%[Link]%7D%7D))
%7D)).observe(document%2C%7BchildList%3A!0%2Csubtree%3A!0%7D)
%[Link]([Link])%7D%7D%7D%7D%2C__webpack_module_cache__
%3D%7B%7D%3Bfunction __webpack_require__(e)%7Bvar t%3D__webpack_module_cache__%5Be
%5D%3Bif(void 0!%3D%3Dt)return [Link]%3Bvar o%3D__webpack_module_cache__%5Be%5D
%3D%7Bexports%3A%7B%7D%7D%3Breturn __webpack_modules__%5Be%5D(o%[Link]
%2C__webpack_require__)%[Link]%7D__webpack_require__.n%3De%3D>%7Bvar t%3De
%26%26e.__esModule%3F()%3D>[Link]%3A()%3D>e%3Breturn __webpack_require__.d(t%2C
%7Ba%3At%7D)%2Ct%7D%2C__webpack_require__.d%3D(e%2Ct)%3D>%7Bfor(var o in
t)__webpack_require__.o(t%2Co)%26%26!__webpack_require__.o(e%2Co)
%26%[Link](e%2Co%2C%7Benumerable%3A!0%2Cget%3At%5Bo%5D%7D)%7D
%2C__webpack_require__.o%3D(e%2Ct)%3D>[Link](e%2Ct)
%3Bvar __webpack_exports__%3D%7B%7D%3B(()%3D>%7B"use
strict"%3B__webpack_require__(548)%2C__webpack_require__(111)%2C__webpack_require__
(407)%3Bconst e%[Link]%[Link]%3Dfunction()
%7Bconst t%3Dnew e%2Co%[Link]%3Breturn [Link]%3Dfunction(e%2Ct)%7B"POST"%3D%3D
%3De%26%[Link]("logger")%3FshowToast("DevHaxx has detected a silent log. This
would mean your account is banned but DevHaxx has prevented this. Stay
safe!"%2C"orange")%[Link](this%2Carguments)%7D%2Ct%7D%3Bconst t%[Link]
%[Link]%3Dfunction(e%2Co)%7Breturn [Link]("logger")%7C
%[Link](o).includes("logger")%3F(showToast("DevHaxx has detected a silent
log. This would mean your account is banned but DevHaxx has prevented this. Stay
safe!"%2C"orange")%[Link](new Error("DevHaxx AntiLog")))%[Link](this
%2Carguments)%7D%[Link]("contextmenu"%2C(function(e)
%[Link]()%7D))%3Bvar o%[Link]("div")
%[Link]%3D"position%3A fixed%3B bottom%3A 10px%3B width%3A 100%25%3B
color%3A white%3B font-size%3A 12px%3B text-align%3A center%3B"%[Link]
%3D"Copyright %C2%A9 DevTech 2023 All Rights
Reserved"%[Link](o)%[Link](%7BuseInnerHTML%3A!
0%2Ctitle%3A"DevHaxx"%2Cdescription%3A"DevHaxx Created by [Link]%2Fhaxx %7C
[Link]"%2Cwidth%3A"610px"%2Ccallback%[Link]%7D)
%[Link]("css-1lvadjd-Typography-Username e15psnz0")
%5B0%5D%26%26showToast("Welcome back to DevHaxx%2C
"%[Link]("css-1lvadjd-Typography-Username e15psnz0")
%5B0%[Link]%2B"!"%2C"green")%3Bvar n%[Link]("div")
%[Link]%3D'<div id%3D"devhaxx" style%3D"position%3A absolute%3B top%3A 158px
%3B left%3A 122px%3B padding%3A 3pt%3B background%3A linear-gradient(to top%2C
rgba(128%2C 0%2C 128)%2C rgb(128%2C 128%2C 128))%3B color%3A rgb(128%2C 128%2C
128)%3B font-size%3A
13px%3B backdrop-filter%3A blur(5px)%3B z-index%3A 9999%3B border-radius%3A 17pt
%3B box-shadow%3A rgba(50%2C 50%2C 50%2C 0.7) 0px 0px 10px%3B width%3A 200px%3B
display%3A block%3B">%5Cn<div class%3D"dh-box" style%3D"background-color%3A
rgba(16%2C 16%2C 24%2C 255)%3B border-radius%3A 15pt%3B backdrop-filter%3A
blur(5px)%3B padding%3A 25px%3B">%5Cn%5Cn%5Cn <div class%3D"devhaxxheader" style
%3D"%5Cn font-weight%3A bold%3B text-align%3A center%3B font-size%3A 45px%3B
cursor%3A move%3B background%3A linear-gradient(to left%2C rgba(128%2C 128%2C
128)%2C rgb(128%2C 0%2C 128))%3B color%3A transparent%3B font-family%3A %5C'Roboto
%5C'%2C sans-serif%3B font-weight%3A 500%3B %5Cn -webkit-background-clip%3A
text%3B line-height%3A80px%3B margin-top%3A-25px%3B text-align%3A center%3B">%5Cn
HAXX%5Cn <%2Fdiv>%5Cn%5Cn <div style%3D"font-weight%3A bold%3B font-size%3A
10px%3B background%3A text-align%3A left%3Bcolor%3A white">%5Cn RSHIFT TO
HIDE%5Cn <%2Fdiv>%5Cn <br>%5Cn %5Cn <div style%3D"padding%3A 0.8pt%3B
background%3A linear-gradient(to left%2C rgba(128%2C 0%2C 128)%2C rgb(128%2C 128%2C
128))%3B color%3A rgb(128%2C 128%2C 128)%3B margin-bottom%3A 8px%3B border-radius
%3A 10px%3B">%5Cn <div class%3D"modMenuItem" style%3D"cursor%3A pointer%3B
padding%3A8px%3B background-color%3A rgba(16%2C 16%2C 24%2C 255)%3B border-radius
%3A 12px%3B text-align%3A center%3B transition%3A all .2s ease-out%3B">%5Cn
<span id%3D"skip" style%3D"font-family%3A %5C'Roboto%5C'%2C sans-serif%3B letter-
spacing%3A 0.8px%3B font-weight%3A 300%3B">Question Skipper<%2Fspan>%5Cn <
%2Fdiv>%5Cn <%2Fdiv>%5Cn%5Cn <div style%3D"padding%3A 0.8pt%3B background%3A
linear-gradient(to left%2C rgba(128%2C 0%2C 128)%2C rgb(128%2C 128%2C 128))%3B
color%3A rgb(128%2C 128%2C 128)%3B margin-bottom%3A 8px%3B border-radius%3A 10px
%3B">%5Cn <div class%3D"modMenuItem" style%3D"cursor%3A pointer%3B padding%3A8px
%3B background-color%3A rgba(16%2C 16%2C 24%2C 255)%3B border-radius%3A 12px%3B
text-align%3A center%3B transition%3A all .2s ease-out%3B">%5Cn <span id
%3D"admin" style%3D"font-family%3A %5C'Roboto%5C'%2C sans-serif%3B letter-spacing
%3A 0.8px%3B font-weight%3A 300%3B">Toggle Dash Admin<%2Fspan>%5Cn <%2Fdiv>%5Cn
<%2Fdiv>%5Cn %5Cn <div style%3D"font-weight%3A bold%3B font-size%3A 12px%3B
background%3A text-align%3A left%3Bcolor%3A white">%5Cn [Link] %7C
[Link]%2Fhaxx%5Cn <%2Fdiv>%5Cn<%2Fdiv>%5Cn'%[Link](n)
%[Link]([Link])
%[Link]("skip").addEventListener("click"%2C(()%3D>
%[Link]("html5Iframe")%[Link]("QUIZ")
%3FshowToast("Quiz Skipper is a DevHaxx premium feature"%2C"orange")
%3A([Link]([Link]("nav-forward"))
%5B1%[Link]()%2CshowToast("Skipped Question!"%2C"purple"))%3AshowToast("Not in
a lesson!"%2C"red")%7D))%3Blet a%3D!
1%[Link]("admin").addEventListener("click"%2C(()%3D>%7B!1%3D%3D
%3Da%3F([Link]([Link]("StudentDashboard-g38"))
%5B1%[Link]%5B0%5D._owner.[Link]()
%2CshowToast("You have access to the admin menu! Be careful as some buttons
%2Ffunctions could cause harm"%2C"cyan")%2Ca%3D!
0)%3A([Link]([Link]("StudentDashboard-g38"))
%5B1%[Link]%5B0%5D._owner.[Link]()
%2CshowToast("You no longer have access to the admin menu."%2C"cyan")%2Ca%3D!
1)%7D))%[Link]%3D!0%[Link]("keydown"%2C(e%3D>
%7B"ShiftRight"%3D%3D%[Link]%26%26(isMenuVisible%3F([Link]%3D!
1%[Link]("devhaxx").[Link]%3D"none")
%3A([Link]%3D!0%[Link]("devhaxx").[Link]
%3D"block"))%7D))%7D)()%7D)()%3B%7D)()%3B

You might also like