Home  >  Article  >  Web Front-end  >  Browser html code quick preview gadget

Browser html code quick preview gadget

php中世界最好的语言
php中世界最好的语言Original
2018-03-12 11:43:082554browse

This time I will bring you a browser html code quick preview gadget. What are the precautions for using the browser html code quick preview gadget? Here is a practical case, let’s take a look.

Pop-up preview directly:

javascript:(function() { 
    var blob = new Blob([window.getSelection().toString()],{type:"text/html"});   
    window.open(URL.createObjectURL(blob)); 
})()

Quickly save to local:

javascript: (function() {  
    var blob = new Blob([window.getSelection().toString()],{type:"text/html"});  
    var a=document.createElement("a");
    a.href=URL.createObjectURL(blob);
    a.download=document.title;
    a.click();
})()

Usage tutorial:

Click to favorite on any web page:

Browser html code quick preview gadget


##Click on any webpage to bookmark

and then click Modify:

Browser html code quick preview gadget


Then click Modify

Enter the collection name and URL. The URL is the above or other script:

Browser html code quick preview gadget


Enter the collection name and URL, the URL is the above or other scripts

Use


Browser html code quick preview gadget
## I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

How nodejs uses the http module to write an upload image interface test client


How nodejs uses jsonp to Implement single sign-on Demo

The above is the detailed content of Browser html code quick preview gadget. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn