<commit_before>/* global chrome */
chrome.runtime.onInstalled.addListener(function () {
    chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {
        chrome.declarativeContent.onPageChanged.addRules([{
            conditions: [
                new chrome.declarativeContent.PageStateMatcher({
                    pageUrl: {
                        hostEquals: 'www.amazon.com'
                    }
                })
            ],
            actions: [new chrome.declarativeContent.ShowPageAction()]
        }]);
    });
});

chrome.pageAction.onClicked.addListener(function (tab) {
    var amazonUrl = tab.url;
    var asin = amazonUrl.match("/([a-zA-Z0-9]{10})(?:[/?]|$)");
    var backpackUrl = 'https://backpackbang.com/item/' + asin[1];

    chrome.tabs.create({ url: backpackUrl });
});<commit_msg>Url points to BD domain now.<commit_after>/* global chrome */
chrome.runtime.onInstalled.addListener(function () {
    chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {
        chrome.declarativeContent.onPageChanged.addRules([{
            conditions: [
                new chrome.declarativeContent.PageStateMatcher({
                    pageUrl: {
                        hostEquals: 'www.amazon.com'
                    }
                })
            ],
            actions: [new chrome.declarativeContent.ShowPageAction()]
        }]);
    });
});

chrome.pageAction.onClicked.addListener(function (tab) {
    var amazonUrl = tab.url;
    var asin = amazonUrl.match("/([a-zA-Z0-9]{10})(?:[/?]|$)");
    var backpackUrl = 'https://bd.backpackbang.com/item/' + asin[1];

    chrome.tabs.create({ url: backpackUrl });
});
{'fraction_non_alphanumeric': 0.14827995255041518, 'fraction_numerical': 0.005931198102016607, 'mean_word_length': 2.219465648854962, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '450370', 'n_tokens_mistral': 513, 'n_tokens_neox': 485, 'n_words': 67}