how to prevent user when opening a new tab,minimising,maximising in browser using javascript jquery - asp.net

I have to restrict the user of opening new tab,minimizing or opening another browser while running a web page.
Is there any way for me to make this happening?

One liner answer, you can't. You can control your page certain extend programmatically by restricting resize of the window or make it full screen but you can't restrict users minimizing or opening another browser while running a web page.
Click here for details of browser full screen mode programmatically, this full screen mode provides an illusion of restricting of another browser opening by hiding the options. But that's not the case, once user exit from full screen everything will be back in original state, so users can perform minimizing or opening another browser or a new tab.

Related

Way to hide splash screen?

Is it possible to hide splash screen in MAF app and directly display some form/page to gather information from user at place of splash screen, and while user is being entering his values then initial loading process (which loads behind splash screen) can be continue at back-end?
The splash screen is of value to you as users know you app is loading. Its purpose is to load quickly as the rest of the app sets up.
Why would you want to move logic into this visual process? I want to caution you that I think it's a poor choice to reject industry standards. Work with the framework.

Canvas LMS open tools in a new tab

I am developing a LTI tool for Canvas LMS. The tool has 2 parts, content selector and content page. The content selector is embeddable while the content page is not embeddable. When the app is launched for first time, I would like to have the content selector embedded in an iframe. After users selected certain content, the app is launched for second time, the content page will be displayed in a new tab.
For now, the content selector will be displayed in the iframe, but when it try to display content page to the user, it display nothing, and I can see the error in chrome console: refused to display in iframe because it set X-Frame-Options=DENY.
I know there is options when creating an assignment: always open the tool in a new browser window, but could I just programmatically determine when to open the tool in the iframe, when to open it in a new browser window ?
Thanks in advance.
Canvas LMS (or any LMS) doesn't allow this configuration to be made on the fly. It has to be set before when you create external tool.

Detect soft keyboard in Meteor cordova with ratchet

Meteor now support mobile apps. That's great. However, I find that the app running as a mobile app is not the same as running in a mobile browser.
When it runs as a mobile app, if the user wants to input to a text field, a soft keyboard shows up. Then, after the user finishes and click the button (at that point, the soft keyboard is still shown), the app brings to another page. However, the new page renders as if the soft keyboard still exists so the lower portion of the screen is blank. The elements that are rendered to a fixed position (like footer) still shows up at the bottom though. Even though the lower portion of the screen is blank, the elements are still there. If I tap the blank portion, and if there is a link or button in the place I tap, the app still brings me to the new page. Since I use Meteor and ratchet, I don't know which one is the issue.
I suspect the issue is that when the user clicks the button, the Meteor renders the new page immediately, but the soft keyboard get hidden afterwords.
This situation doesn't happen when the meteor app runs in a mobile browser, however.
I use meteor, iron-router, and ratchet. The issue is identified in an android 4.X device. Any idea how to fix the mobile app specific issue? Thanks.
PS. If I delay firing the page transition by a second, I don't have the issue. So my suspicion is correct that the page transition happens before the keyboard is hidden.

Download Image From Site

This site is claiming to prevent the download of images and preventing screenshots. Is this truly possible to stop and can anyone crack it in their demos? What tools can be used to download an image set as a background?
http://www.iptlock.com/how.php
It isn't possible, no.
If the client can see it on their screen, then it exists on their computer. Even if that weren't the case, there is always the whole analog thing (people can literally take a picture of their screen).
If you have chrome: Just go to one of their demos, press ctrl+shift+c, and an inspector will show up, showing you all individual parts of the page. Then select the image from the list (servedemoimg) , right mouse click on it, and you can save the jpg. It is not possible to prevent people from downloading those files. And this company doesn't even make it particularly difficult.
Their scheme "works" by hiding the content whenever a key is pressed or the main window loses focus. They also attempt to detect that something has been copied to the clipboard and they replace it with some text ("It is prohibited to copy distribute or in any way alter these copyrighted images").
That means that if you press any key to copy the content, you'll just get the "locked" graphic. The same goes for switching to another app (like a screen capture app) because the screen capture app will have focus instead of the browser, causing the lock graphic to show. If you do manage to copy something to the clipboard, it immediately replaces the content with the text I mentined above.
Furthermore, their content is a background image so you can't easily print or right-click to copy the image by disabling JS.
However, it's pretty trivial to defeat. My first attempt using IE8 was trivial. When I went to the "protected" page, IE asked me if I wanted to allow the page to access the clipboard, and I clicked "Don't Allow". Then I pressed PrntScr and was able to paste the content into another program. This worked because that particular key isn't captured by the browser and I didn't allow the page to see my clipboard.
Then I tried again, this time allowing clipboard access. This time I used a screen capture program that automatically captures the foreground window after a set time delay. This worked because I was able to give the browser window focus, and the screen capture utility just saved the image as a file instead of putting it on the clipboard.
Lastly, I just saved the source as a file and saw background:url(servedemoimg.php?filename=IPTbusiness_graphicdesign_ITB). Just putting http://www.iptlock.com/servedemoimg.php?filename=IPTbusiness_lawyer_ITB into my browser's address bar made the complete "protected" content show up for me to download, print, email, etc.

Disable Focus to Browser

Can any one tell how to disable focus to a browser.
Hi i am currently working in .net application and i need to disable the tab focus to browser objects such as toolbars,address bar, since the user will not be using these components often
Thank you
Please don't do this, it breaks what the user expects a webpage to do. Messing with the fundamental behavior breaks several things:
My tab button and where I expect it to go
Screen readers for the disabled
Trust in your application
In some cases, you need to ask why? before asking how?, this is one of those. Anything that behaves differently from the other 99.9999% of the web is broken in the eyes of your user.
Well, I agree with Nick Craver. If you have to disable due to some crap requirements, then try opening a new window without toolbar, editable address bar etc and load the page inside the newly opened window.

Resources