Can’t copy text from webpage?

Sometimes I come upon a website that I cannot copy text from a HTML web page. Simply cannot click and highlight the lines I try to select for copying. I thought that my browser/mouse was not working. But I go to other sites, I am able to highlight/copy normally. They must’ve done something on that page probably to prevent content from being lifted of the page easily?

Why is this and how do they do it? Is this a javascript in the page that prevents me from copying?

ANSWER

Could be a script on the webpage. I’m certain that can be done or already been done through Javascript before.

I know that the same effect can be achieved via CSS alone. It is easier, cleaner and does not add to another Javascript messing up or slowing down a site. I prefer this method over the other.

Below are the CSS lines that does what you want. Different ones for different browsers. It is vendor specific for some, but does the same exact thing.

   user-select: none; /* Supported by Chrome, Firefox & Opera */
  -moz-user-select: none; /* Firefox (older) */
  -ms-user-select: none; /* Edge */
  -khtml-user-select: none; /* Konqueror */
  -webkit-touch-callout: none; /* Safari for iOS */
  -webkit-user-select: none; /* Safari for Mac */

Try it out. You can make it for entire page/site.

* {
     /* CSS lines go here */
}

Or you can make it so only targeted content will have it using Class or ID selectors.

#text-no-select {
     /* ID selector -  CSS lines go here */
}

.text-no-select {
     /* Class selector -  CSS lines go here */
}

Be aware this does not totally prevent anyone from copying content on a website. There are many other ways to go around this or even with a Javascript impementation. It is a minor roadblock.

Frontend technologies for Microservices

I have backend app which is SpringBoot – doing CRUD and Business logic, and split into microservices. Like program-setup, lead, survey etc.

I want to understand what would be a better frontend framework.
Tasks the frontend would carry – theme setup, calling different microservice, uploading/downloading files on AWS S3, designing email templates and dashboards etc

I see that PHP has its backend where these tasks can be done. Can we use Node for doing same and frontend would be AngularJs

So the flow I see is. AngularJs -> Node -> SpringBoot -> DB

Things like AWS S3 upload and download would be done by Node and only S3 file path will be sent to Spring to process anything further
Also, in this flow there wouldn’t be need to enable CORS on Spring side.

Can anyone shed some light on what to use for frontend to call microservices?

Go to Source
Author: Kedar Javalkar

How do web ad’s collect revenue? By page rendering or by clicking?

Many sites ask for disabling AdBlock to continue using the site and I’ve obliged to the request if it’s absolutely must.


However, even if I disable the AdBlock, I never click the ads (hide them if possible), so my question is:

Does the site get money simply by rendering the ad to the page or does the money come only when clicking the ad?


If it’s by clicking, then what’s the point of disabling AdBlock? I won’t click the ads so they won’t get money either way.

I understand the disabling if the ad revenue algorithm activates through page rendering.

Go to Source
Author: K4R1

GitHub: Is it possible to view a list of all the projects a member has contributed to?

In the GitHub web-app user interface, is it possible to view a list of all the projects to which you have contributed?

What about a list of all the projects to which another user has contributed?

Go to Source
Author: RockPaperLizard

validationRegex to accept/validate listed characters

5 to 16 alpha or alphanumeric to include special characters such as:
◦*Hyphen ( – )
◦*Slash ( / )
◦*Backslash ( )
◦*Asterisk ( * )
◦*Dollar Sign ( $ )
◦*Period ( . )
◦*Ampersand ( & )
◦*Comma ( , )
◦*Number Sign ( # )
◦*Open Parenthesis ( ( )
◦*Closed Parenthesis ( ) )
◦*Colon ( : )

Current code example:

PASSWORD: {id: password, label: PASSWORD, name: PASSWORD, validationRegex: ^[a-zA-Z0-9]+$, minLength: 5, maxLength: 16, errorMsg: message}

Go to Source
Author: Marcus