mirror of
				https://gitee.com/bitdance-team/chrome-extension
				synced 2025-11-04 11:53:10 +08:00 
			
		
		
		
	添加判断
This commit is contained in:
		@@ -7,9 +7,10 @@ $(function() {
 | 
			
		||||
 | 
			
		||||
    // 每次改变开关状态时刷新页面使功能及时生效
 | 
			
		||||
    chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
 | 
			
		||||
        console.log('click');
 | 
			
		||||
        location.reload();
 | 
			
		||||
        sendResponse('Reload page');
 | 
			
		||||
        if (request.info === 'click') {
 | 
			
		||||
            location.reload();
 | 
			
		||||
            sendResponse('Reload page');
 | 
			
		||||
        }
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    // 控制功能是否开启
 | 
			
		||||
 
 | 
			
		||||
@@ -6,9 +6,10 @@ $(function() {
 | 
			
		||||
    console.log("[BitDance extension] 学生助手插件 - 鼠标样式模块加载成功");
 | 
			
		||||
    // 每次改变开关状态时刷新页面使功能及时生效
 | 
			
		||||
    chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
 | 
			
		||||
        console.log('mouse');
 | 
			
		||||
        location.reload();
 | 
			
		||||
        sendResponse('Reload page');
 | 
			
		||||
        if (request.info === 'mouse') {
 | 
			
		||||
            location.reload();
 | 
			
		||||
            sendResponse('Reload page');
 | 
			
		||||
        }
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    // 控制功能是否开启
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user