Browse Source

fix: clarify xhrInject requires cookies, #1898

tophf 2 years ago
parent
commit
0cd14f405e
2 changed files with 11 additions and 6 deletions
  1. 3 0
      src/_locales/en/messages.yml
  2. 8 6
      src/options/views/tab-settings/index.vue

+ 3 - 0
src/_locales/en/messages.yml

@@ -535,6 +535,9 @@ labelXhrInject:
     (`$1` will be shown as `page`) Option in Advanced settings to enable
     synchronous injection.
   message: Synchronous $1 mode
+labelXhrInjectNote:
+  description: Shown to the right of "synchronous page mode" in options.
+  message: (except incognito and sites with disabled cookies)
 labelXhrInjectHint:
   description: Tooltip of the `Synchronous page mode` option in Advanced settings.
   message: >-

+ 8 - 6
src/options/views/tab-settings/index.vue

@@ -105,14 +105,13 @@
             </select>
             <a class="ml-1" href="https://violentmonkey.github.io/posts/inject-into-context/" target="_blank" rel="noopener noreferrer" v-text="i18n('learnInjectionMode')"></a>
           </label>
-          <label>
-            <setting-check name="xhrInject"/>
-            <tooltip :content="i18n('labelXhrInjectHint')">
+          <tooltip :content="i18n('labelXhrInjectHint')">
+            <setting-check name="xhrInject">
               <locale-group i18n-key="labelXhrInject">
                 <code>page</code>
-              </locale-group>
-            </tooltip>
-          </label>
+              </locale-group> <ruby v-text="i18n('labelXhrInjectNote')"/>
+            </setting-check>
+          </tooltip>
           <label v-if="!settings.xhrInject">
             <setting-check name="ffInject"/>
             <tooltip :content="i18n('labelFastFirefoxInjectHint')">
@@ -313,5 +312,8 @@ export default {
       margin-top: 0;
     }
   }
+  ruby {
+    color: var(--fill-8);
+  }
 }
 </style>