xiaoxiaoflood / firefox-scripts

userChromeJS / autoconfig.js and extensions
Mozilla Public License 2.0
954 stars 83 forks source link

ColorfulTabs #121

Closed DenBoxed closed 2 years ago

DenBoxed commented 2 years ago

Hi xiaoxiaoflood,

I was wondering if it would be possible to add colorfultabs-31.2.3-fx.xpi to the list of extensions? https://accessfirefox.org/Colorful_Tabs.php

117649 commented 2 years ago

Looks like you are asking others to modernize this addon for you.

THE ANSWER SHOULD UNSURPRISINGLY BE NO.

DenBoxed commented 2 years ago

Looks like you are asking others to modernize this addon for you.

THE ANSWER SHOULD UNSURPRISINGLY BE NO.

Any tips on how I can modernize it for others OneAgreement?

117649 commented 2 years ago

Looks like you are asking others to modernize this addon for you. THE ANSWER SHOULD UNSURPRISINGLY BE NO.

Any tips on how I can modernize it for others OneAgreement?

Not very difficult in fact. If the addon is not bootstrap type make it so. Give it a 'Bootstrap.js' file. Then edit the script and CSS of it, replace all outdated objects, function calls.... and replace all XUL element with HTML element.

Check the git history of the EasyDragToGo+ see what change I made and how I made them, which should be a example simple and short.

DenBoxed commented 2 years ago

Thank you for the information, now that I have some idea what to do I'll give it a shot.

DenBoxed commented 2 years ago

@117649 I did a bit of editing, mind taking a look? https://gofile.io/d/3wf2c7 I get the corrupt message, but I might be overlooking something simple. Tweaked the install.rdf, and added bootstrap.js

117649 commented 2 years ago

You need an <em:optionsType>1</em:optionsType> node in 'install.rdf'.

DenBoxed commented 2 years ago

Alright, I added 1</em:optionsType>. However, I am still getting a corrupt message. https://gofile.io/d/YydDF8

I packed the extension with 7zip, is that alright?

I put the original ctrlabs 'install.rdf' next to the one I edited in the first frame below. Anything I need to bring over from the original or does it look alright to you?

I did a mash up of the original 'chrome.manifest' and the edited next it to it. Along with the one you did with 'easydragtogo'.

I think my corruption issue is coming from the content section. Also did you do any edits in preferences for 'easydragtogo'. @117649

Untitled collage

117649 commented 2 years ago

image You can't mix node declare and attribute declare together.

DenBoxed commented 2 years ago

@117649 I just followed what you had with your install.rdf. So I am adding </em: homepageurl> to to the end of it to fix the issue?

0A916CC0-E322-4C58-AFE4-9E3B4B93CE7A

117649 commented 2 years ago

A working install.rdf I've just made:

<?xml version="1.0"?>
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
    xmlns:NC="http://home.netscape.com/NC-rdf#"
    xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <RDF:Description RDF:about="rdf:#$lZf0J1"
        em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
        em:minVersion="52.0"
        em:maxVersion="56.0"
    />
    <RDF:Description RDF:about="urn:mozilla:install-manifest"
        em:id="{0545b830-f0aa-4d7e-8820-50a4629a56fe}"
        em:unpack="true"
        em:type="2"
        em:name="ColorfulTabs"
        em:version="31.2.1"
        em:creator="Shivanand Sharma"
        em:description="Colorful Tabs colors every tab in a different color and makes them easy to distinguish while beautifying the overall appeal of the interface."
        em:homepageURL="http://www.addongenie.com/colorfultabs"
        em:optionsURL="chrome://clrtabs/content/clrtabsopt.xul"
        em:optionsType="1"
        em:bootstrap="true"
        >
        <em:targetApplication RDF:resource="rdf:#$lZf0J1" />
    </RDF:Description>
</RDF:RDF>

What I see here is your not yet have enough knowledge on how to this. You should at least learn how to open Firefox browser toolbox, which would show you why install is failed. And its the most important tool you need for develop an addon. image Try learn more on yourself and try more. I won't always be here to answer your question.

DenBoxed commented 2 years ago

I've replaced all the xul elements with html. Only seem to be getting one issue trying to get options to load along with the icon. x1 x2 @117649 Apologies, still new to the whole world of extension modernization. I appreciate your time in explaining this stuff to me, thanks again.

https://gofile.io/d/6yKOb6

117649 commented 2 years ago

You'd better to set up a git repo for your project and use a proper code editor like VS code. So you can track what you have changed and show others.

you've changed file name to 'clrtabsopt.xhtml' so change the paths reference it accordingly in 'chrome.manifest' and anywhere else.

I'm also left some words ahead of your next steps here. 'clrtabsopt.xhtml' uses 'prefwindow' element which is no longer part of the Firefox but fortunately you can find script for that in TMP's source. You'll need a way to load the contents of 'clrtabs.xml', you can also find 'overlay.jsm' in TMP's source for that. Some early issues on repo of TMP should be very useful to you.

DenBoxed commented 2 years ago

I set up the repo, https://github.com/DenBoxed/Colorfultabs. Started using VS code, pretty neat with the side by side comparison option built in. Checked TMP's source and found preferences which seems to match up with prefwindow. Also added in overlay.jsm. Still running into a bug but I think I patched it. The options page is loading but just wide. @117649

117649 commented 2 years ago

I set up the repo, https://github.com/DenBoxed/Colorfultabs. Started using VS code, pretty neat with the side by side comparison option built in. Checked TMP's source and found preferences which seems to match up with prefwindow. Also added in overlay.jsm. Still running into a bug but I think I patched it. The options page is loading but just wide. @117649

Its a file called 'prefs-ce.js' reference it in your option's page file.

DenBoxed commented 2 years ago

Referenced @117649 https://github.com/DenBoxed/Colorfultabs/releases/tag/ctlrtabs

DenBoxed commented 2 years ago

@xiaoxiaoflood Mind taking a look at the addon and giving me some feedback?

xiaoxiaoflood commented 2 years ago

Never used this addon, all I can say is that I tried it and doesn't seem to work. Nothing has changed in tabs and preferences dialog is broken.