File tree Expand file tree Collapse file tree 3 files changed +11
-27
lines changed Expand file tree Collapse file tree 3 files changed +11
-27
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3535 < a href ="https://rewindjs.io "> rewindjs.io</ a >
3636 < a href ="https://github.com/reactrewind/react-rewind "> Github</ a >
3737 < script src ="page_action.js "> </ script >
38- < script type ="text/javascript " src ="devtools.js "> </ script >
3938</ body >
4039</ html >
Original file line number Diff line number Diff line change 1- document . addEventListener ( 'DOMContentLoaded' , ( ) => {
2- const btn = document . querySelector ( '#gitHub_btn' ) ;
3- btn . addEventListener ( 'click' , ( ) => {
4- chrome . tabs . query ( { active : true , currentWindow : true } , function ( tabs ) {
5- chrome . tab . create ( { url :'https://github.com/reactrewind/react-rewind' } ) ;
6- } ) ;
7- // chrome.runtime.getURL('https://github.com/reactrewind/react-rewind');
8- // btn.addEventListener('click', () => {
9- // chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
10- // console.log(tabs);
11- // chrome.tabs.sendMessage(tabs[0].id, "change_color");
12-
13- // });
14- } ) ;
1+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
2+ var links = document . getElementsByTagName ( 'a' ) ;
3+ for ( var i = 0 ; i < links . length ; i ++ ) {
4+ ( function ( ) {
5+ var ln = links [ i ] ;
6+ var location = ln . href ;
7+ ln . onclick = function ( ) {
8+ chrome . tabs . create ( { active : true , url : location } ) ;
9+ } ;
10+ } ) ( ) ;
11+ }
1512} ) ;
You can’t perform that action at this time.
0 commit comments