File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- - feat: 新增快速插入 Obsidian Callouts #254
1+ - style: 调整 popup 页面已读功能及样式修改
2+ - feat: 兼容 idcflare.com 网站(90% 功能已经可以兼容使用,少量功能暂无法适配,如:图片生成分享图)
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default {
2323 data () {
2424 return {
2525 silentBookmark: false ,
26- bookmarkIntervalId: null , // 添加变量存储定时器ID
26+ bookmarkIntervalId: null , // 添加变量存储定时器 ID
2727 }
2828 },
2929 methods: {
@@ -77,7 +77,7 @@ export default {
7777 })
7878 .get ();
7979 var bookmarkDataurl =
80- " https://linux.do " + $ (" .header-title .topic-link" ).attr (" href" );
80+ window . location . origin + $ (" .header-title .topic-link" ).attr (" href" );
8181
8282 var newBookmark = {
8383 url: bookmarkDataurl,
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export default {
4444 })
4545 .get ();
4646 var bookmarkDataurl =
47- " https://linux.do " + $ (" .header-title .topic-link" ).attr (" href" );
47+ window . location . origin + $ (" .header-title .topic-link" ).attr (" href" );
4848
4949 var newBookmark = {
5050 url: bookmarkDataurl,
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import {
3737export default {
3838 data () {
3939 return {
40+ url: " window.location.origin" ,
4041 isMinimized: true ,
4142 content: " 输入用户名查询等级信息" ,
4243 username: " " ,
@@ -177,7 +178,7 @@ export default {
177178 },
178179 async fetchAboutData () {
179180 try {
180- const response = await fetch (` https://linux.do /about.json` , {
181+ const response = await fetch (` ${ this . url } /about.json` , {
181182 headers: {
182183 Accept: " application/json" ,
183184 " User-Agent" : " Mozilla/5.0" ,
@@ -194,7 +195,7 @@ export default {
194195 },
195196 async fetchUserData (username ) {
196197 try {
197- const response = await fetch (` https://linux.do /u/${ username} /summary.json` , {
198+ const response = await fetch (` ${ this . url } /u/${ username} /summary.json` , {
198199 headers: {
199200 Accept: " application/json" ,
200201 " User-Agent" : " Mozilla/5.0" ,
Original file line number Diff line number Diff line change 1515 </div >
1616 <ul v-if =" first20Topics.length > 0" >
1717 <li v-for =" item in first20Topics" :key =" item.id" >
18- <a :href =" 'https://linux.do /t/topic/' + item.id" target =" _blank" >
18+ <a :href =" `${this.url} /t/topic/` + item.id" target =" _blank" >
1919 {{ item.title }}
2020 </a >
2121 </li >
3131export default {
3232 data () {
3333 return {
34+ url: " window.location.origin" ,
3435 status: false ,
3536 first20Topics: [],
3637 };
@@ -46,7 +47,8 @@ export default {
4647
4748 // 获取历史已读记录数据
4849 getFirst20Topics () {
49- fetch (" https://linux.do/read.json" )
50+ const url = window .location .origin ;
51+ fetch (` ${ url} /read.json` )
5052 .then ((response ) => response .json ())
5153 .then ((data ) => {
5254 this .first20Topics = data .topic_list .topics .slice (0 , 20 );
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { createApp } from 'vue';
33import App from './App.vue' ;
44
55export default defineContentScript ( {
6- matches : [ 'https://linux.do/*' ] ,
6+ matches : [ 'https://linux.do/*' , 'https://idcflare.com/*' ] ,
77 cssInjectionMode : 'ui' ,
88
99 async main ( ctx ) {
Original file line number Diff line number Diff line change 22 "name" : " linuxdo-scripts" ,
33 "description" : " manifest.json description" ,
44 "private" : true ,
5- "version" : " 1.4.9 " ,
5+ "version" : " 1.5.0 " ,
66 "type" : " module" ,
77 "scripts" : {
88 "dev" : " wxt" ,
Original file line number Diff line number Diff line change 1+ ## 1.5.0
2+
3+ - style: 调整 popup 页面已读功能及样式修改
4+ - feat: 兼容 idcflare.com 网站(90% 功能已经可以兼容使用,少量功能暂无法适配,如:图片生成分享图)
5+
16## 1.4.9
27
38- feat: 新增快速插入 Obsidian Callouts #254
You can’t perform that action at this time.
0 commit comments