zombieFox / nightTab

A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks with nightTab.
https://zombiefox.github.io/nightTab/
GNU General Public License v3.0
1.78k stars 254 forks source link

Safari Extension developed #318

Closed samrth012 closed 1 year ago

samrth012 commented 3 years ago

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 - samrth012@gmail.com 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 commented 3 years ago

Would love to help and do contact me positively.

zombieFox commented 3 years ago

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.

samrth012 commented 3 years ago

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.

zombieFox commented 3 years ago

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

samrth012 commented 2 years ago

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

metruzanca commented 2 years ago

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 commented 2 years ago

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.

samrth012 commented 2 years ago

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

samrth012 commented 2 years ago

@metruzanca Any alternative to web pack for compilation?

metruzanca commented 2 years ago

@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 :)

samrth012 commented 2 years ago

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

metruzanca commented 2 years ago

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 commented 2 years ago

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

samrth012 commented 2 years ago

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.

zombieFox commented 2 years ago

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.

metruzanca commented 2 years ago

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

samrth012 commented 2 years ago

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

IzzyWorks commented 2 years ago

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

samrth012 commented 2 years ago

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

IzzyWorks commented 2 years ago

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.

samrth012 commented 2 years ago

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 commented 1 year ago

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.

nalimovm commented 1 year ago

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.

IzzyWorks commented 1 year ago

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.

samrth012 commented 1 year ago

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

IzzyWorks commented 1 year ago

Muchas Gracias!

nalimovm commented 1 year ago

@samrth012 Hello. Is there any updates?

samrth012 commented 1 year ago

@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

Beay-apb commented 1 year ago

@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?

samrth012 commented 1 year ago

@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 commented 1 year ago

If anyone has an apple developer account do contact if you would like to contribute

samrth012 commented 1 year ago

Screenshot 2023-07-12 at 9 47 04 AM

samrth012 commented 1 year ago

@zombieFox @metruzanca @IzzyWorks @nalimovm hello everyone thanks a lot for the support and the help provided by everyone. Finally today I can say its complete the extension is done. https://github.com/samrth012/nightTab/releases/tag/Safari Open safari enable the extension and enjoy!!! 🎉🎉🎊

If anyone is unable to use nightTab after that also make sure in Safari settings newtab is selected to nightTab extension.

For any other queries do drop a comment.

samrth012 commented 1 year ago

@zombieFox do add me as collaborator add update the readme for the installation instruction and releases for mac.

Beay-apb commented 1 year ago

Thanks, mate, it works very well

samrth012 commented 1 year ago

Thanks, mate, it works very well

Welcome bro ✌️

spawnYzn commented 1 year ago

Unfortunately I ran into two bugs. First is "open links in new tab" doesn't seem to work, neither by configuring it in the Bookmarks section of the settings of nightTab, neither by trying to cmd + click on a link. Second is trying to change any appearance settings of the theme reloads the tab. Can you look into it please? The theme thing isn't bothering me much, as I imported all settings from my Windows machine, but the link in new tab thing is annoying. Thank you for your work so far, was really looking forward to this release! :)

samrth012 commented 1 year ago

Unfortunately I ran into two bugs. First is "open links in new tab" doesn't seem to work, neither by configuring it in the Bookmarks section of the settings of nightTab, neither by trying to cmd + click on a link. Second is trying to change any appearance settings of the theme reloads the tab. Can you look into it please? The theme thing isn't bothering me much, as I imported all settings from my Windows machine, but the link in new tab thing is annoying. Thank you for your work so far, was really looking forward to this release! :)

I have tested it so far on like 25-30 devices and it seems fine with none of the problems you mentioned and the appearance thing it is working perfectly fine might be some problem with the installation or steps. I recommend you trying to reinstall once with the exact steps I mentioned, if it still doesn't work do ping me with the screenshot of the issue or a small recording. THANKS FOR THE INFORMATION!

samrth012 commented 1 year ago

@zombieFox ???

zombieFox commented 1 year ago

@samrth012 I highly recommend you fork the project and provide instructions for the Safari workaround there.

As mentioned earlier I can not commit to supporting another browser and I much prefer to to develop for browsers that operate the same way, (Firefox and Chrome).

Adding the instructions to the readme goes against one of the ideals of the project by making the installation complex. Should I add these instructions I will undoubtedly see an increase in support, issue and bug posts/emails.

Since you have successfully found a workaround to running nightTab in Safari I will close this issue.

samrth012 commented 1 year ago

Not a workaround but extension is complete and thanks for replying.

samrth012 commented 2 months ago

@metruzanca @zombieFox @IzzyWorks Thanks for the all the support, rethought about the main idea around this project, have worked out a few things, made the installer really simple like any other app on macOS, I will keep updating with every version bump, if you like it please add it in the official page.

It is working as any other extension should work, nothing complex left, only install app open and done, same way apps from App Store or any other side loaded app works on Mac.

I am raising a pull request if you would like to add, it would be great, or if not maybe give a reference to my repo so I can keep maintaining it, and it reaches the users.