How do I programmatically close the Immersive Reader? - azure-cognitive-services

I would like to be able to close the Immersive Reader in code, without the need for user intervention. Is there a way to do this?

You can use the ImmersiveReader.close() function to close the Immersive Reader. The documentation is available here.

Related

Need to create a link to a qr code on a phone home screen

This might be too simple to find an easy solution for.
We are moving to a system where our staff clock on and clock off using a QR or Bar code.
We can provide each staff member with their own QR code on a sticker and they clock on/off by passing it under the scanner as they arrive/depart. (Typically this is stuck on the back of their phone.)
A better option would be to display the code on the screen of the phone itself. This can be done by saving the code in the photo gallery and displaying it for scanning but this is quite fiddly and the whole point is to streamline the process.
Any suggestions?
I thought there might be a way to create a home screen icon that links to an image and displays it but if so it alludes me.
Failing this I thought there might be an app to achieve the same result but I have not been able to find one.
First, have a imgur or any other photo sharing accounts. Then, put all the staff's qrcodes in there and assign each their own qrcode link which they can add to home screen
The link will look something like this
https://i.imgur.com/9EQgzFm.png

How to unfullscreen a window without notifying it?

I'm trying to enhance the gTile extension by allowing it to resize a fullscreen window to a tiled area of the screen. That's a pretty common thing to do when tiling and it's pretty handy since some windows will hide some chrome when in fullscreen mode. But I'm having the hardest time figuring out how to do that.
Searching the internet led me to this forum post which mentions EWMH and _NET_WM_FULLSCREEN. I've tried to find ways to access window manager hints but can't find anything bashing by head on Looking Glass or scanning through the docs. Is this kind of thing possible through a shell extension?
Meta.Window is likely what you are looking for:
https://gjs-docs.gnome.org/meta4~4_api/
Setting Window.decorated = false may be able to remove the title bar or perhaps getting the compositor object and changing it from there. However this will still keep the address and tab bars in chrome. You may need to find another method to signal chrome to hide those.
There is not really an easy way to do this, the thread you linked is in regards to VLC and modifying it's source code.

Populating the "Now Playing" screen on watchOS 6

I'm trying to display the currently playing audio from my app in the watches Now Playing app.
I'm streaming the audio using the AVPlayer and set the AVAudioSession category and activated the session.
I've also tried to use the MPNowPlayingInfoCenter without any luck.
Is there another way to provide this information.
And just as I hit post I figured it out!
You also have to setup the MPRemoteCommandCenter. 🤦‍♂️
Leaving this here for future reference.
Please show some code for reference, but MvNowPlayingInfoCentre should work fine.
Take a look at this for more information: https://stackoverflow.com/a/41686834/12149235

Disable print, print screen, right click using asp.net

How to Disable print, print screen, right click using asp.net
You cant. You cannot avoid content being copied from your pages.
Disabling Right Click is possible, but it doesnt solve your 'problem'. The user could still copy your image, by disabling javascript or just inspecting the source.
And even if you could disable those keys, the user could still just make a photo of his monitor. Good luck disabling that!
Short answer: You don't. You are writing a web application; features of the underlying platform are outside your scope, and you have no business trying to fiddle with them.
Long answer: You can try to capture those keys using javascript, and override the default behaviour, which will somewhat stop very naïve users, but all it takes to disable this "security" is to turn off javascript. Even if you come up with more sophisticated "protection", the essence remains: You are sending content to the client, and once it gets there, it is out of your hands. Given suitable tools (wget is enough for most things), anyone can copy and modify your content in any way they like. Similarly, whatever can be shown on the screen inside a browser can be captured and saved. There is no way around it. If you don't want your content copied, don't send it.
Forget about it. You will irritate your end users who will find a way to con you and do what you didn't want them to do. Forbidden fruit is always the sweetest. By telling them explicitly "you cannot do this", they will wonder why do you want to guard your content and they might try even harder to do stuff you otherwise wouldn't want them to do.
Psychology and technology are against you in this case.
Printing
You could disable printing (well sort of - it's not 100% effective) using a "print" style sheet.
I have not tried it myself, but here is a link that could get you started: http://webdesign.about.com/od/advancedcss/qt/block_print.htm
Print screen
Print screen is something that is typically controlled by the operating system not the browser nor webpage. So you are unlikely to be able to stop this. However, casting my mind back I remember a time (perhaps a long long time ago), where you couldn't take screen shots in Windows (maybe Windows 98) of videos... so if your really in need of disabling print screen - perhaps you could perhaps encode your content in a video... but this will have many many downfalls - namely accessibility, search engine optimisation and it being a royal pain to do... so I wouldn't recommend it under any circumstance.
Right screen
Right click you can disable, but not using a server-side technology (such as ASP.net) instead in a client-side technology such as javascript. A quick search in your favourite search engine will find some help. But disabling right click is rudimentary to get around, so it is not full proof.
An alternative to protect your content is to possibly investigate "rights" in PDFs. I believe you can disable the "right" to print.
However none of these solutions are going to be full-proof. As long as you are making your content available to an end-user on their own computer, there is always going to be a way around your restrictions.
I have implemented for disabling printing using window.onbeforeprint()
Refer this Answer

How accessible is Fullcalendar?

I'm having problems making FullCalendar fully accessible. I'm using the default month view and can't access the next, previous, and today buttons on the top right without using a mouse. If I run a screen reader, I can access those buttons but not without running the screen reader.
And on another note, I currently am using tool tips that pop up when you mouse over an event title to display more information. If anyone has any tips on how to make those accessible to a screen reader or accessible without a mouse, I'd greatly appreciate it!
Regarding the buttons, I would advice that you write new buttons if accessibility is important. These buttons you could then hook up to your own javascript functions that moves to previous and next.
Check out this documentation example
Regarding the second problem, I think that's the same problem not just for physically impaired but also for things like mobile browsers. My tip would be to avoid onmouseover if the information that appears is really important.

Resources