yt-anti-translate icon indicating copy to clipboard operation
yt-anti-translate copied to clipboard

Is there any plan to provide the firefox version?

Open NRngnl opened this issue 2 years ago • 13 comments

Hi @zpix1,

I tried to run this extension on firefox with NRngnl/yt-anti-translate@7deec1e and some changes to manifest.json. It works as expected.

I would like to ask if you plan to maintain a firefox version?

I found that @artisticfox8 maintained his own firefox fork but it seems that it is not updated after you commit new changes.

Will you set up an CI which upload the extension to Mozilla AMO as well?

NRngnl avatar Oct 18 '22 06:10 NRngnl

I could update it. I haven't updated it closely to the Chrome version, because a lot of the time, Firefox users are sent different HTML than Chrome users, so I wrote some new code for it

úterý 18. října 2022 Anthony Hung @.***> napsal(a):

Hi @zpix1,

I tried to run this extension on firefox with @.*** and some changes to manifest.json. It works as expected.

I would like to ask if you plan to maintain a firefox version?

I found that @artisticfox8 maintained his own firefox fork but it seems that it is not updated after you commit new changes.

Will you set up an CI which upload the extension to Mozilla AMO as well?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.< https://ci4.googleusercontent.com/proxy/RlXGNrP3tpD8UbvIaU_W0MhrHsQ8vJrs1KdgMgkqGjlQyNyduRdcIG1yhFcZxjV5OZ2_-Tb5hJGj5En6wf1vicKqvwbNVCpR7HbJPdYKtaGk1v-Fg60F0srfEAvtw4tm51uK-Bsa2Olxh6sD_R96zZHa0cBiYRAp_eGg45VpLp1lUOkykD7qC2PV8mVCT7j2wPG3eCCtPeN-WAv-giF-E-XcUOxujmB1cqo=s0-d-e1-ft#https://github.com/notifications/beacon/ASLSN4IDGIMPNELU6YU4C4DWDZBMLA5CNFSM6AAAAAARHXXSUSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFIM33GY.gif>Message ID: @.***>

artisticfox8 avatar Oct 18 '22 10:10 artisticfox8

I could update it. I haven't updated it closely to the Chrome version, because a lot of the time, Firefox users are sent different HTML than Chrome users, so I wrote some new code for it úterý 18. října 2022 Anthony Hung @.> napsal(a): Hi @zpix1, I tried to run this extension on firefox with @. and some changes to manifest.json. It works as expected. I would like to ask if you plan to maintain a firefox version? I found that @artisticfox8 maintained his own firefox fork but it seems that it is not updated after you commit new changes. Will you set up an CI which upload the extension to Mozilla AMO as well? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.< https://ci4.googleusercontent.com/proxy/RlXGNrP3tpD8UbvIaU_W0MhrHsQ8vJrs1KdgMgkqGjlQyNyduRdcIG1yhFcZxjV5OZ2_-Tb5hJGj5En6wf1vicKqvwbNVCpR7HbJPdYKtaGk1v-Fg60F0srfEAvtw4tm51uK-Bsa2Olxh6sD_R96zZHa0cBiYRAp_eGg45VpLp1lUOkykD7qC2PV8mVCT7j2wPG3eCCtPeN-WAv-giF-E-XcUOxujmB1cqo=s0-d-e1-ft#https://github.com/notifications/beacon/ASLSN4IDGIMPNELU6YU4C4DWDZBMLA5CNFSM6AAAAAARHXXSUSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFIM33GY.gif>Message ID: @.***>

Thanks. It is great to hear that you are still going to maintain it.

NRngnl avatar Oct 18 '22 12:10 NRngnl

Hi @zpix1,

I tried to run this extension on firefox with NRngnl/yt-anti-translate@7deec1e and some changes to manifest.json. It works as expected.

I would like to ask if you plan to maintain a firefox version?

I found that @artisticfox8 maintained his own firefox fork but it seems that it is not updated after you commit new changes.

Will you set up an CI which upload the extension to Mozilla AMO as well?

So basically you changed extension geturl to runtime geturl and thats it? Or did you do any other modifications?

What features are you missing in my fork, by the way?

artisticfox8 avatar Nov 03 '22 19:11 artisticfox8

Ok, nevermind, I found out the old method to get the video title didn't work. So I put background.js from the chrome version to my Firefox version, and the main video title translation worked right away

artisticfox8 avatar Nov 03 '22 19:11 artisticfox8

@zpix1 The thing my version does better though, is enabling the addon without a full page reload

artisticfox8 avatar Nov 03 '22 20:11 artisticfox8

Calling tabs.reload() to reload the current tab is not efficient at all, and it is slow

My implementation can enable the addon without a reload, instantly:

In background.js:

browser.runtime.onMessage.addListener((message => {
    if(message == "Enable"){ 
       untranslateCurrentVideo();
       untranslateOtherVideos();
    }
}));

in Chrome, just replacing browser with chrome works in this example

and in options.js in saveOptions:

let message;
if(document.getElementById('status').innerText == "Enabled"){
    message = "Enable";
}else if(document.getElementById('status').innerText == "Disabled"){
    message = "Disable";
}
browser.tabs.query({url:"*://*.youtube.com/*"}, function(tabs){
    for (var x = 0; x < tabs.length; x++) {
        browser.tabs.sendMessage(tabs[x].id, message)
        .then(response => { 
          console.log("Message from the content script:",response);
        })
        .catch(e => {
            console.log(e);
        });
    }
});

In this case, stripping the response would work, because no response is being sent, I just show how to do it completely

What do you think?

artisticfox8 avatar Nov 03 '22 20:11 artisticfox8

@artisticfox8 It would be cool to update titles without page reload, but consider that disable should move translated titles back. If you manage to achieve same result we have with page reload without actual page reload, create a PR.

zpix1 avatar Nov 04 '22 05:11 zpix1

Consider this issue to continue discussion in: https://github.com/zpix1/yt-anti-translate/issues/2

zpix1 avatar Nov 04 '22 05:11 zpix1

@artisticfox8 It would be cool to update titles without page reload, but consider that disable should move translated titles back. If you manage to achieve same result we have with page reload without actual page reload, create a PR.

I added that in in my version. Take a look at https://github.com/artisticfox8/yt-anti-translate

You might have to change the async syntax a bit tho

artisticfox8 avatar Nov 05 '22 14:11 artisticfox8

@artisticfox8 please update. I really love it, but now it has a conflict with OneTab. Actually everything works well, except when I bring the cursor above the tab, it should show the title but now (just for youtube) it show some endless repeated titles... Since I am using an add-on OneTab that can bookmark the tabs, now the bookmarks are having the same endless repeated titles. I guess it is triggered by some youtube update (or FF update?), some weeks ago it didn't do it.

image

image

just a screenshot without this extension enabled:

image

barn852 avatar Jul 05 '24 09:07 barn852

I have just found a YouTube Anti Translate Updated by NetStranger... it works well.

barn852 avatar Jul 05 '24 10:07 barn852

@artisticfox8 please update. I really love it, but now it has a conflict with OneTab. Actually everything works well, except when I bring the cursor above the tab, it should show the title but now (just for youtube) it show some endless repeated titles... Since I am using an add-on OneTab that can bookmark the tabs, now the bookmarks are having the same endless repeated titles. I guess it is triggered by some youtube update (or FF update?), some weeks ago it didn't do it.

image

image

just a screenshot without this extension enabled:

image

Hi, I actually incorporated his changes to my fork at https://github.com/artisticfox8/yt-anti-translate yesterday Right now it isn't released on addons.mozilla.org yet, it is the version 1.5.14 on Github. Could you please test again?

artisticfox8 avatar Jul 12 '24 09:07 artisticfox8

It works well, like before. Thanks for the update.

barn852 avatar Jul 12 '24 18:07 barn852