You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3777,45 +3778,53 @@ var chromePermissionsContains = function ({ permissions, origins }) {
3777
3778
}
3778
3779
3779
3780
try{
3780
-
chrome.runtime.sendMessage(
3781
-
{
3782
-
requestPermissions: true,
3783
-
requestWebNavigation: true,
3784
-
tabOriginWithSlash
3785
-
},
3786
-
asyncfunctionasyncCallback(status){
3787
-
if(chrome.runtime.lastError){
3788
-
console.log('Error message reported by Magic CSS:',chrome.runtime.lastError);
3789
-
alertNote(
3790
-
'Error! Unexpected error encountered by Magic CSS extension.<br />You may need to reload webpage & Magic CSS and try again.',
3791
-
10000
3792
-
);
3793
-
}
3794
-
if(status==='request-granted'){
3795
-
awaitmarkAsPinnedOrNotPinned(editor,'pinned');
3796
-
if(myWin.flagEditorInExternalWindow){
3797
-
chromeRuntimeMessageIfRequired({
3798
-
type: 'magicss',
3799
-
subType: 'mark-as-pinned-without-notification'
3781
+
constonRequestGranted=asyncfunction(){
3782
+
awaitmarkAsPinnedOrNotPinned(editor,'pinned');
3783
+
if(myWin.flagEditorInExternalWindow){
3784
+
chromeRuntimeMessageIfRequired({
3785
+
type: 'magicss',
3786
+
subType: 'mark-as-pinned-without-notification'
3787
+
});
3788
+
}
3789
+
alertNote(
3790
+
'<span style="font-weight:normal;">Now onwards, </span>styles would be applied automatically <span style="font-weight:normal;">even without loading this extension<br/>(for pages on <span style="text-decoration:underline;">'+tabOriginWithSlash+'</span>)</span>',
3791
+
10000
3792
+
);
3793
+
sendEventMessageForMetrics({
3794
+
name: 'applyStylesAutomaticallyPinComplete',
3795
+
spot: 'header'
3796
+
});
3797
+
};
3798
+
3799
+
if(runningInKiwiExtensionLikeEnvironment()){
3800
+
onRequestGranted();
3801
+
}else{
3802
+
chrome.runtime.sendMessage(
3803
+
{
3804
+
requestPermissions: true,
3805
+
requestWebNavigation: true,
3806
+
tabOriginWithSlash
3807
+
},
3808
+
asyncfunctionasyncCallback(status){
3809
+
if(chrome.runtime.lastError){
3810
+
console.log('Error message reported by Magic CSS:',chrome.runtime.lastError);
3811
+
alertNote(
3812
+
'Error! Unexpected error encountered by Magic CSS extension.<br />You may need to reload webpage & Magic CSS and try again.',
3813
+
10000
3814
+
);
3815
+
}
3816
+
if(status==='request-granted'){
3817
+
awaitonRequestGranted();
3818
+
}elseif(status==='request-not-granted'){
3819
+
alertNote('You need to provide permissions to reapply styles automatically',10000);
'<span style="font-weight:normal;">Now onwards, </span>styles would be applied automatically <span style="font-weight:normal;">even without loading this extension<br/>(for pages on <span style="text-decoration:underline;">'+tabOriginWithSlash+'</span>)</span>',
3804
-
10000
3805
-
);
3806
-
sendEventMessageForMetrics({
3807
-
name: 'applyStylesAutomaticallyPinComplete',
3808
-
spot: 'header'
3809
-
});
3810
-
}elseif(status==='request-not-granted'){
3811
-
alertNote('You need to provide permissions to reapply styles automatically',10000);
0 commit comments