Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 616 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 616 Bytes

Brand Colour Scraper Logo

Chrome Extension: Find website brand colours

API Example

var tabs;

window.addEventListener('brand-pages', function(response){
    tabs = response.detail.tabs;
    console.log(tabs);
    var colorRequest = new CustomEvent('brand-request-colors', { detail: { tabId: tabs[0].id }});
    window.dispatchEvent(colorRequest);
});

window.addEventListener('brand-colors', function(response){
    var colors = response.detail;
    console.log(colors);
});

var pagesRequest = new CustomEvent('brand-request-pages');
window.dispatchEvent(pagesRequest);