This commit is contained in:
xieyinlu
2022-08-19 16:46:32 +08:00
parent 89e5fc77af
commit ff550607ba
47 changed files with 60295 additions and 4 deletions

View File

@@ -1,12 +1,22 @@
$(function () {
alert("加载中")
chrome.tabs.query({ active: true, lastFocusedWindow: true }, tabs => {
let url = tabs[0].url;
console.log(tabs[0]);
$('#total').val(url);
let favIconUrl = tabs[0].favIconUrl;
let title = tabs[0].title;
$('#url').val(url);
$('#title').val(title);
$('#icon').val(favIconUrl);
$("#icon-img").attr("src",favIconUrl);
// use `url` here inside the callback because it's asynchronous!
})
})
$("#sumbit").keyup(function(){
txt=$("input").val();
$.post("demo_ajax_gethint.asp",{suggest:txt},function(result){
$("span").html(result);
});
});
// $(function(){
// chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
// let url = tabs[0].url;