useful information

How to copy anti-drag text

Sometimes, when you find good information and try to spread it, there will be many people who experience inconvenience by applying the drag prevention function. Basically, you don't want to copy and paste your own text, so you probably did. Still, everyone who is going to spread will spread. It is something that we have to leave to people's conscience.

Of course, I am not telling you this in the hopes of using it for such a malicious (?) purpose. Occasionally, some people who posted coding related posts also blocked copy and paste. I don't think he did that on purpose to follow through that long source code one by one. In that case, I will tell you in the hope that it will be of some help.

Find anti-drag posts

For example, if you have a post like this, and you want to copy this source code, imagine that it has anti-drag functionality fed into it. Most people will have to type them one by one without thinking of any other way. That would be really annoying, right?

Open developer mode

So how can I copy that code? I'll explain in Chrome. Press F12. Some people even block the developer mode shortcuts while going there. In that case, you can go directly to the menu and open it.

Activate the element selection icon

And if you look at the top left corner of developer mode, you will find the following selection icon. Activate this icon.

If you place the mouse cursor on the desired position, the part is highlighted as shown below, and the selection is made by clicking.

This will automatically move the block to the desired location in the Elements tab of developer mode.

Copy and utilize Selector

If you right-click here, a menu pops up and select Copy > Copy selector.

Then, the following values ​​will be copied, so don't panic if you think it's a strange alien word. It doesn't matter if you don't know exactly what this value means.

// Values ​​copied with the Copy selector
#code_1611322355434 > code

Using this value, we will enter the following in the console window. This can be difficult too, so I'll provide the code as is.

You can copy and paste this part as it is.

console.log(document.querySelector('Values ​​copied').textContent)
// ex) console.log(document.querySelector('#code_1611322355434 > code').textContent)

And when we hit enter, the value of the part we want is output as follows.

Of course, it can be copied.

It was so easy to copy.

var test = new Vue({
    el: '#test',
    mounted: function() {
    methods: {}

We hope that you will use it usefully, and I would like to ask you to refrain from copying and distributing copyrighted or sensitive text. I'll leave it to your conscience.

Thanks 🙂

Leave a Reply

Your email address will not be published.