• वेबसाइटों के cookie consent banner को अपने-आप reject या बंद करने वाला Chrome extension
  • मौजूदा auto-accept extensions के विपरीत, यह extension non-essential cookies को पहले reject करता है, और असफल होने पर banner को बंद करने का तरीका अपनाता है
  • Onetrust जैसे "cookie consent solution vendors" को detect करने के तरीके से सटीक detection और rejection logic लागू किया गया है
  • यह extension Cursor AI tool और Vibe coding से विकसित किया गया है, और इसका code open source है

मुख्य कोड

  • तय किए गए vendors की detection क्रमवार की जाती है
    const findAndClickRejectButtons = () => {  
      commonCookiePopupChecks.forEach(({ check, rejectOrClose }) => {  
        if (check()) {  
          rejectOrClose();  
          return;  
        }  
      });  
    }  
    
  • किसी खास vendor को ढूंढना: OneTrust
    const checkForOneTrust = (): boolean => !!document.getElementById('onetrust-consent-sdk');  
    
    const closeOrRejectOneTrust = () => {  
      const rejectButton = document.getElementById('onetrust-reject-all-handler');  
      if (rejectButton) {  
        rejectButton.click();  
        return true;  
      }  
    
      const consentSDK = document.getElementById('onetrust-consent-sdk');  
      if (consentSDK) {  
        consentSDK.remove();  
        return true;  
      }  
      return false;  
    };  
    

अभी कोई टिप्पणी नहीं है.

अभी कोई टिप्पणी नहीं है.