popup: USO workaround for finding extension styles
This commit is contained in:
parent
0978308325
commit
7cf27601ae
|
@ -114,7 +114,8 @@
|
|||
<div class="left-gutter"></div>
|
||||
<div class="main-controls">
|
||||
<div id="find-styles">
|
||||
<a id="find-styles-link" href="#" i18n-text="findStylesForSite"></a>
|
||||
<a id="find-styles-link" href="https://userstyles.org/styles/browse/"
|
||||
i18n-text="findStylesForSite"></a>
|
||||
</div>
|
||||
<div id="write-style">
|
||||
<span id="write-style-for" i18n-text="writeStyleFor"></span>
|
||||
|
|
|
@ -74,7 +74,6 @@ function initPopup(url) {
|
|||
};
|
||||
setupLivePrefs();
|
||||
|
||||
$('#find-styles-link').onclick = handleEvent.openURLandHide;
|
||||
Object.assign($('#popup-manage-button'), {
|
||||
onclick: handleEvent.openManager,
|
||||
onmouseup: handleEvent.openManager,
|
||||
|
@ -96,10 +95,11 @@ function initPopup(url) {
|
|||
installed);
|
||||
}
|
||||
|
||||
// find styles link
|
||||
$('#find-styles a').href =
|
||||
'https://userstyles.org/styles/browse/all/' +
|
||||
encodeURIComponent(url.startsWith('file:') ? 'file:' : url);
|
||||
$('#find-styles-link').onclick = handleEvent.openURLandHide;
|
||||
$('#find-styles-link').href +=
|
||||
url.startsWith(location.protocol) ?
|
||||
'?search_terms=Stylus' :
|
||||
'all/' + encodeURIComponent(url.startsWith('file:') ? 'file:' : url);
|
||||
|
||||
if (!url) {
|
||||
document.body.classList.add('blocked');
|
||||
|
|
Loading…
Reference in New Issue
Block a user