nightTab icon indicating copy to clipboard operation
nightTab copied to clipboard

Safari Extension developed

Open samrth012 opened this issue 3 years ago • 21 comments

Hey this is Samrth here I wanted to contribute in this since long and I have been working on the safari extension design since some time, today I have finally built the safari extension for nightTab and all the features work perfectly fine, except the data restore, I want to know how the data is imported so that I can fix it.

I would like to add it and contribute, You can contact me by mail - [email protected] And also add me as contributor directly on the same email.

Attaching the screenshots for proof. Screenshot 2021-11-19 at 7 03 01 PM Screenshot 2021-11-19 at 7 03 55 PM

samrth012 avatar Nov 19 '21 13:11 samrth012

Would love to help and do contact me positively.

samrth012 avatar Nov 19 '21 13:11 samrth012

Hi. Glad you like the project. I've looked into supporting Safari in the past but the developer experience is very poor. In short I do not have the time or compulsion to build workarounds and pay yearly fees to support Safari.

Happy for you to fork the project and build a Safari supported version if you wish to.

zombieFox avatar Nov 19 '21 17:11 zombieFox

Sure just want to know how the data is being restored and exported by the extension using json and how is it implemented in the css so that I can fix the problem.

samrth012 avatar Nov 20 '21 18:11 samrth012

The application checks the local storage on page load for any saved data. Then the data module takes over. The order of events is:

data.init() starts off the data restore process.

Then data.restore(data.load()) passes in any data found in local storage.

data.restore validates the data and if it passes the different chunks of the state object is sent to the different parts of the app. E.g: State restore and Bookmark restore

zombieFox avatar Nov 21 '21 11:11 zombieFox

Ok thanks just wanted to ask a few more things, where are these files located in the packed extension ?

samrth012 avatar Nov 22 '21 10:11 samrth012

The "packaged extension" is minified code and not meant to be read by a human. You probably want to look at the code before it goes thru webpack instead.

metruzanca avatar Nov 22 '21 21:11 metruzanca

I know @zombieFox is pretty occupied as of late, so @samrth012 if you need a bit more in depth help with stuff like webpack or getting your fork to pull in updates properly let me know as I've dealt with it with my development fork of nighttab.

metruzanca avatar Nov 22 '21 21:11 metruzanca

Ok @metruzanca thanks for the info. Will do it and keep asking you for details.

samrth012 avatar Nov 24 '21 09:11 samrth012

@metruzanca Any alternative to web pack for compilation?

samrth012 avatar Nov 24 '21 09:11 samrth012

@samrth012

Any alternative to web pack for compilation?

Yes, there are alternatives but I do not recommend changing build tool for your fork (unless you know what you're doing, but since you had to ask, I'd strongly recommend you didn't).

There's a couple of reasons not to, the primary one being that if we (Zom & I) update nighttab's build process in any way, you'd have to figure out how to do the same exact thing with your build tool and so you'd be creating extra duplicate work. Another reason to stay with webpack is its the most popular and so it's got really good documentation and support.

Earlier you also said:

for the safari extension I need the direct html files for ease of use

Again, this is going to result in a LOT of extra work. the html and js files are generated by the build tool. If we update nighttab, you'll be on your own updating your fork and probably ending up reverse engineering compiled code from scratch every time.

Source code is always easier to work with so "direct files" is going to make your job MUCH harder.

Correct me if I'm wrong, but from your comments I have a feeling you've never worked with nodejs before (maybe even javascript, idk). If this is the case, I'd highly recommend getting nodejs installed and cloning this repo and try to get it running and then building on your machine.

Then you should see what requirements safari has for extensions and make those changes to the source code.


I'm happy to help you get things running if you need. We could even jump into a google meet sometime. The more people who work on nighttab the better :)

metruzanca avatar Nov 24 '21 14:11 metruzanca

Yes thats what I did cloned the repo and builded it locally and I am finding the way I can use the source code directly. And also I am clear on using web pack and I have totally understood it.

And also I have worked around with nodejs and javascript earlier.

Then you should see what requirements safari has for extensions and make those changes to the source code.

Also I also had the same thought and I am working on the same since then.

Surely we can have google meet someday before finalising the extension

samrth012 avatar Nov 24 '21 17:11 samrth012

Yes thats what I did cloned the repo and builded it locally and I am finding the way I can use the source code directly. And also I am clear on using web pack and I have totally understood it.

Alright, you've found your way around things. Awesome!

Since feature parity between firefox and chrome is quite important to nighttab, you might want to fork the repo instead of just cloning it. That should help you pull in updates from nighttab more easily since github's intergrations will give you a hand. In mosts cases any changes on nighttab would just require pulling from upstream and a git rebase (or a git merge).

metruzanca avatar Nov 25 '21 00:11 metruzanca

Forgot to ask if could share your repo with us once you've got something working?

metruzanca avatar Nov 25 '21 00:11 metruzanca

Forgot to ask if could share your repo with us once you've got something working?

Surely will do it in a while.

Yes thats what I did cloned the repo and builded it locally and I am finding the way I can use the source code directly. And also I am clear on using web pack and I have totally understood it.

Alright, you've found your way around things. Awesome!

Since feature parity between firefox and chrome is quite important to nighttab, you might want to fork the repo instead of just cloning it. That should help you pull in updates from nighttab more easily since github's intergrations will give you a hand. In mosts cases any changes on nighttab would just require pulling from upstream and a git rebase (or a git merge).

Got it.

samrth012 avatar Nov 25 '21 10:11 samrth012

Thanks @metruzanca for jumping in and providing direction ❤️

I know @zombieFox is pretty occupied as of late

I'll jump in where I can, work and life schedules permitting.

zombieFox avatar Nov 25 '21 11:11 zombieFox

Been about a month, @samrth012 hows the Safari version going?

metruzanca avatar Dec 23 '21 21:12 metruzanca

Next to final release, just working on a few bug fixes @metruzanca

samrth012 avatar Dec 24 '21 08:12 samrth012

Has this endeavour died? @samrth012 How's it going?

IzzyWorks avatar Jun 16 '22 22:06 IzzyWorks

Has this endeavour died? @samrth012 How's it going?

It didn't die, i had three deaths in my family back to back, so i have been struck on that since long, i am trying to come back and start working all over again and continue things that were going great. And also my dog died so technically four deaths

samrth012 avatar Jun 17 '22 04:06 samrth012

Has this endeavour died? @samrth012 How's it going?

It didn't die, i had three deaths in my family back to back, so i have been struck on that since long, i am trying to come back and start working all over again and continue things that were going great. And also my dog died so technically four deaths

Gezzus. Well take care of you're self, this can wait. If you are actively coding again just shoot me a line as I will likely remain interested in porting over nightTabs. This extension is amazing.

IzzyWorks avatar Jun 17 '22 18:06 IzzyWorks

Has this endeavour died? @samrth012 How's it going?

It didn't die, i had three deaths in my family back to back, so i have been struck on that since long, i am trying to come back and start working all over again and continue things that were going great. And also my dog died so technically four deaths

Gezzus. Well take care of you're self, this can wait. If you are actively coding again just shoot me a line as I will likely remain interested in porting over nightTabs. This extension is amazing.

Surely will do, even i was too excited for this until this happened 😥

samrth012 avatar Jun 17 '22 18:06 samrth012

Has this endeavour died? @samrth012 How's it going?

It didn't die, i had three deaths in my family back to back, so i have been struck on that since long, i am trying to come back and start working all over again and continue things that were going great. And also my dog died so technically four deaths

Gezzus. Well take care of you're self, this can wait. If you are actively coding again just shoot me a line as I will likely remain interested in porting over nightTabs. This extension is amazing.

Hi i am starting from tomorrow, lets see what best get.

samrth012 avatar Dec 09 '22 18:12 samrth012

Has this endeavour died? @samrth012 How's it going?

It didn't die, i had three deaths in my family back to back, so i have been struck on that since long, i am trying to come back and start working all over again and continue things that were going great. And also my dog died so technically four deaths

Gezzus. Well take care of you're self, this can wait. If you are actively coding again just shoot me a line as I will likely remain interested in porting over nightTabs. This extension is amazing.

Hi i am starting from tomorrow, lets see what best get.

Hi. How is it going? I was really impressed with this extension on chrome and start looking for safari version, so I'm checking this thread since december 2021 and waiting for you guys to finally switch to safari. Maybe i even would agree to participate in testing process if it will be helpful.

nalimovm avatar Mar 22 '23 18:03 nalimovm

Same! Your.extention is probably one of my favourite plugins I've evr. I'd use your safari solution religiously if you ever release it. I have some frontend skills with HTML, Javascript for dom manipulation so if be happy to help take some of the load off if you return to development.

IzzyWorks avatar Mar 23 '23 22:03 IzzyWorks

Sure guys have been working on it since long there are some bugs which need sorting will give out the final version soon

samrth012 avatar Mar 25 '23 11:03 samrth012

Muchas Gracias!

IzzyWorks avatar Mar 26 '23 00:03 IzzyWorks

@samrth012 Hello. Is there any updates?

nalimovm avatar May 04 '23 11:05 nalimovm

@samrth012 Hello. Is there any updates?

Ya just a few changes left, got exams on between so I gave less time to work on it

samrth012 avatar May 04 '23 11:05 samrth012

@samrth012 how is it going? I am waiting for almost a year now, since first time I saw this topic. Will we see it anytime soon?

Beay-apb avatar Jul 11 '23 21:07 Beay-apb

@samrth012 how is it going? I am waiting for almost a year now, since first time I saw this topic. Will we see it anytime soon?

Hi sorry guys couldn't update for long, the extension build is complete but it is definately unsigned, I don't have an apple developer account anymore so figuring a way around for that as safari ignored unsigned extension by default so u need to enable it again and again in settings.

samrth012 avatar Jul 12 '23 01:07 samrth012