How to bypass pasting restrictions into a textbox? - copy-paste

Pasting into a textbox has been disabled on said site.
Attempted to use browser extensions to block code but eventually any extensions detected in the browser would cause the site to error, forcing user to uninstall plugins.
Tried using software to allow fast typing of content from clipboard onto a textbox but it seems it's being picked up either as too rapid typing or as typing not coming from a physical keyboard. Results in a pop-up box that spams warning the user, preventing one from proceeding.
Any alternatives or leads? Much appreciated.

Related

Is there a way to bypass Chrome geolocation dialog in Protractor tests?

I faced this problem, when automating an application with protractor.
Once I open a home page I get geolocation dialog with Block/Allow buttons, which didn't let proceed without selection either option
It turned out, that this dialog is not an instance of alert, that's why browser.switchTo().alert().confirm() didn't work
Passing '--disable-notifications' argument to Chrome also didn't solve the problem
Research online didn't give any positive results. How to solve it?
The solution to the problem is to pass "prefs": {'profile.default_content_setting_values.geolocation': 2} to capabilities object in your protractor.config.js
Below is another option that does pretty much the same thing.
So chrome may take an argument --user-data-dir=/tmp/chrome which specifies profile to open chrome with. If profile doesn’t exist at specified directory it creates default one.
Then if you open /tmp/chrome/Default/Preferences you’ll see an object with preferences. You needed to set default_content_setting_values.geolocation to 2 (not 1 or 0) to make it NOT prompt that dialog

Custom CSS not applying to email field in Enfold WP theme on iPhones

I've made a fairly simple "Coming soon" page for a client here and I have a very strange problem. Normally I'm the "go-to" CSS specialist of everyone I personally know, but on this one I am out of resources/ideas trying to figure it out.
On iPhones, using the default browser (Safari), the email input, which has a type="text", just like the name field, displays a white border instead of a blue one. The client reported the problem (she has an iPhone6 - not sure if S or not) and I tested it myself with on an ancient piece (4s) we just keep around the office for testing. For all I know, border-color is a CSS1 property, same as border-width and border-style. They are all applied explicitly so, basically no browser in the world should have a problem rendering it.
I haven't been able to reproduce the issue in any emulator or online snippet tool, so I don't see any point in posting code here. I'm assuming someone with proper iOS/Safari debugging tools/environment might be able to inspect the element and see why the CSS doesn't apply. I also tested the CSS for errors. The one I applied (child theme) is bug free. The parent theme CSS reports some issues but they're mostly vendor prefixes. But it's a good, well designed and well coded theme: Enfold by Kriesi.
EDIT: On further testing I just discovered the color property is also set to white too, when it should be the same blue: #255AA8.
Any idea on how I could debug this (on a Windows 10 machine) is also welcome.
Thank you for your time.
I found the problem... in the themes's .js.
Apparently, it detects if on mobile (somehow they do it properly - as the script doesn't fire in emulators) and if the field requires an email address, the type attribute is changed from text to email via js, so the email keyboard layout pops up when user inputs their email.
Adding
#top div .av-light-form input[type="email"] {
}
to my list of selectors did the job.

MVC 5 With Tinymce Editor Contain Words "FIND", "SERVICES" and some more around 8 more letter "ERR_CONNECTION_RESET"

recently i am facing problem on my all MVC applications using TinyMce editor i am using that editor to allow users to input content of the page, strange things is happening now. when ever they have type following word in content.
"find", "services","replace" and some 8 more character inside editor, and when we hit safe button immediately after server giving me following error.
This webpage is not available
ERR_CONNECTION_RESET
as far for me this is Firewall problem. but i need to know if someone have same problem how can we explain network people?
The error clearly indicates as you mentioned that this is an internet problem as it suggests webpage is not available. There is a video here that indicates you may need to reset somethings on your network. Checkout if that helps.

Sublime text remove multy cursor selection in windows

Is there a way to remove selection when you use multy cursors. I mean when I use ctrl+d it expandes selection and ctrl+k, ctrl+d to skip selection works, but ctrl+u for removing selection is not working on windows. Is there another shortcut or some snippents to make it work?
It sounds like there is a plugin interfering with the CtrlU undo option. To find it, open the console with Ctrl` and enter the command
sublime.log_commands(True)
This shows what's going on behind the scenes when you press key combinations or use mouse buttons. Test it by making some multiple selections with CtrlD, and you should see
command: find_under_expand
in the console. Now, try to undo one of your selections by hitting CtrlU and see what comes up. If you see
command: soft_undo
then it's not another plugin issue, as that's what you'd expect to see. However, if (as I suspect) another plugin is interfering, you'll see something else there. If you do, hopefully you'll be able to trace it to the plugin it belongs to and disable it.
When you're done, enter
sublime.log_commands(False)
in the console to turn logging off, then close the console by hitting Esc or Ctrl`.

Google Chrome Extension: Print the page silently

I'm developing an internal Google Chrome Extension that needs a way to initiate print the current page to the printer. I do not want the default Print dialog to come up (so, javascript:window.print() is out of question).
As far as I understand, this is not possible just with the JS + HTML plug-in, so I'm also open to using the NPAPI plugin also (with a dummy mime-type). And I'm concerned for Windows platform only.
I'm also open for various hacks / workarounds if possible, though a standard solution would be nice.
If you think this is not possible, let me know if you know any feature request logged for it?
Any suggestions/clarifications are welcome..
In chrome (v18+) we have the --kiosk --kiosk-printing switches. One can print automatically to default printer without print confirmation.
You can see it from this video http://www.youtube.com/watch?v=D6UHjuvI7IE
Since NPAPI allows you to create native C++ plugins that you can interact with through an object tag (which you can use from an extension), that would probably be the way to do it.
The tricky bit is that I don't know of a good way to get the bits for printing the page. The only person I know of who has done something similar to this actually got the window handle for the browser (available through NPAPI) and scraped the bits off of it to print that way, but that won't take into account print stylesheets or anything. You could also try using automation events to try to control the print dialog, but I have no idea if that would work or not.
By design, the browsers try not to let you do something like this, as it could open some serious vulnerabilities if any website could just start printing things to your printer without confirmation...
Anyway, if you find a way to do it with C++ you can use FireBreath to ease the creation of the NPAPI plugin.
There are various extensions that take snapshots of the current web page (for example, this one); you could adapt one to send the image to a printer via an NPAPI plugin.
I've recently been looking for a similar ability, and it seems like it would be quite possible using Chrome's new native messaging api.
https://developer.chrome.com/extensions/nativeMessaging
There are plenty of examples of this with C#, but here is one quick example of troubleshooting Chrome native messaging with a basic C# application
Native messaging from chrome extension to native host written in C#
I realize this may be a day late and a dollar short, but in case anyone else comes across this question, this is the solution that worked for me. From inside a C# app, you can directly print to installed printers using the PrintDocument class. If you figured out a way to get the page image, this would be far easier than using firebreath or NPAPI.
Disable print preview in Google Chrome on Mac
Quit Google Chrome
Launch Terminal on your Mac. (Search “Terminal” using the Search box)
Type defaults write com.google.Chrome DisablePrintPreview -bool true
Close Terminal and open Google Chrome
Disable print preview in Google Chrome on Windows
Close Google Chrome
From your desktop, right click Google Chrome
Click Properties
In the dialog box, add ‘ –disable-print-preview‘ at the end of the Target field sans the apostrophe (make sure to include the space before –)
Click Apply
Disable print preview in Firefox on Mac
In the address bar type “about:config” and press Enter.
Right click on the page, hover over ‘New’ and click on ‘Boolean’
Type ‘print.always_print_silent’ as the preference name and click ‘OK’
Click on ‘true’ and click ‘OK’.
Close the about:config window.
Disable print preview in Firefox on Windows
In the address bar type “about:config” and press Enter.
Right click on the page, hover over ‘New’ and click on ‘Boolean’ Type
‘print.always_print_silent‘ as the preference name and click ‘OK’
Click on ‘true’ and click ‘OK’.
Close the about:config window.
https://support.dryfta.com/how-to-disable-print-preview-in-chrome-firefox-on-windows-mac/

Resources