Skip to content

a chrome exteion that copy url a basic level chrome extion

Notifications You must be signed in to change notification settings

MahendraSH/copy-url-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

copy url chrome extention


1) copies The url from the tab

use the chrome api
chrome.tabs.query({
    active: true,
    currentWindow: true
}, function(tabs) {
    var tabURL = tabs[0].url;
    console.log(tabURL);
});


2)and stores it in the local storage in the broser

Window.localStorage
Window.localStorage is used for storage


setItem

localStorage.setItem('myCat', 'Tom');

getItem

const cat = localStorage.getItem('myCat');

clear

localStorage.clear();


3) or u can give the input and hit save


### 4) use of JSON.stringify() and JSON.parse()

JSON.stringify(convert obj to string )

JSON.parse( convert to string to obj)

we can use DOM and addevntlistner and then store in Window.localStorage

The chrome extention preview

preview1


previw2

About

a chrome exteion that copy url a basic level chrome extion

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published