differenciate between Service Portal and Desktop in client scriptsIssue <!-- div.margin { padding: 10px 40px 40px 30px; } table.tocTable { border: 1px solid; border-color: #e0e0e0; background-color: #fff; } .title { color: #d1232b; font-weight: normal; font-size: 28px; } h1 { color: #d1232b; font-weight: normal; font-size: 21px; margin-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #cccccc; } h2 { color: #646464; font-weight: bold; font-size: 18px; } h3 { color: #000000; font-weight: bold; font-size: 16px; } h4 { color: #666666; font-weight: bold; font-size: 15px; } h5 { color: #000000; font-weight: bold; font-size: 13px; } h6 { color: #000000; font-weight: bold; font-size:14px; } ul, ol { margin-left: 0; list-style-position: outside; } --> Scenario In case users want to setupt client scripts to run both in Desktop and Service Portal, but in the same script differenciate between each another According to the following documentation, you can use the script: if (window === null) // Write your mobile compatible code here else // Write your desktop compatible code here According However, this will only work in case the following property is set: glide.script.block.client.globals type TRUE/FALSE value false Keep in mind that this will not work within scoped applications as documented in KB0719258 The following community thread may be helpful in such cases: Scoped Applications and Client Scripts: A Primer https://community.servicenow.com/community?id=community_blog&sys_id=788c66e1dbd0dbc01dcaf3231f961969