diff --git a/view_github_code_in_vscode.js b/view_github_code_in_vscode.js index 21b85d0..2e251e1 100644 --- a/view_github_code_in_vscode.js +++ b/view_github_code_in_vscode.js @@ -10,14 +10,14 @@ (function() { 'use strict'; - var navi = document.getElementsByClassName('file-navigation') + var navi = document.querySelectorAll('.file-navigation') console.log(navi) if (navi.length > 0) { navi = navi[0] var node = document.createElement('a') node.className = 'btn btn-primary' node.style = 'margin-left: 0.5rem' - node.href = "https://github1s.com" + window.location.pathname + node.href = "https://githubvsc.zmy.pub" + window.location.pathname node.innerHTML = "View Code" node.target = "_blank" // var sep = navi.getElementsByClassName('flex-auto')[0]