'Customize' button stops propagation & opens tab.

This commit is contained in:
derv82 2017-12-06 01:40:39 -08:00
parent 0366c8508f
commit da6ea2b69b

View File

@ -364,9 +364,12 @@
// Style has customizations // Style has customizations
installButton.classList.add('customize'); installButton.classList.add('customize');
const customizeButton = $('.searchResult-customize', entry); const customizeButton = $('.searchResult-customize', entry);
customizeButton.dataset.href = searchAPI.BASE_URL + userstyleSearchResult.url;
customizeButton.classList.remove('hidden'); customizeButton.classList.remove('hidden');
customizeButton.href = searchAPI.BASE_URL + userstyleSearchResult.url; customizeButton.onclick = event => {
customizeButton.onclick = handleEvent.openURLandHide; event.stopPropagation();
handleEvent.openURLandHide.call(customizeButton, event);
};
} }
/** Installs the current userstyleSearchResult into stylus. */ /** Installs the current userstyleSearchResult into stylus. */