3 ms·
in sourcecode this snipped looked interesting https://github.com/YouG-o/YouTube_No_Translation/blob/91061a2a77ef72c76ce6288f0a6a7693c4a005bb/src/content/descrip
by rasz 1y ago
in sourcecode this snipped looked interesting https://github.com/YouG-o/YouTube_No_Translation/blob/91061a2a77ef72c76ce6288f0a6a7693c4a005bb/src/content/description/descriptionIndex.ts#L205-L213 https://github.com/YouG-o/YouTube_No_Translation/blob/91061a...
// Prevent translation on all levels
[element, attributedString, snippetAttributedString].forEach(el => {
if (el) {
el.setAttribute('translate', 'no');
sadly magic translate="no" attribute does nothing on its own :( Probably related to standard https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/translate https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/... so obviously Google doesnt honor it.
following
el.style.setProperty('translate', 'no', 'important');
is kinda funny too, CSS translate is about positioning not language :) and since 'no' is not a valid value this instruction is ignored anyways.