76

I've seen this extension in the Chrome Web store, which shows the newest videos of a YouTube channel. I want to modify this extension in order to make it work with a different channel.

How can I get this done?

Rob W
  • 341,306
  • 83
  • 791
  • 678
Alex_dlc
  • 907
  • 1
  • 7
  • 3
  • 1
    Edit `config.js`, and set `"channel":"..."` to whatever you want. Not tested, but that made sense to me. PS. This question is probably not suitable for Stack Overflow, because it's unlikely to help anyone else besides you. Please read the [faq] to know what you can ask. – Rob W May 21 '13 at 22:44
  • 2
    I was advised to ask this here. And I dont see how this only helps me – Alex_dlc May 22 '13 at 00:50
  • By that reply to my comment, I deduce that you've got zero knowledge of Chrome extensions, right? I'll post the answer below, because it doesn't fit in the comments. I'll also be making your question more generic in order to make it useful to others. – Rob W May 22 '13 at 08:59
  • @user2407370 SO is a good way to ask 'How do I see the files from a Chrome extension' or 'Where in the channel in a YouTube URL' but you should first tell us what you've already tried to solve the problem and you shouldn't ask us to solve the whole thing. – mikemaccana May 22 '13 at 09:09

1 Answers1

152

You've got two options:

  1. Contact the extension's developer, and ask for assistance.
  2. Edit the source code

I'm going to explain how you can modify an extension, and install it, in easy terms.

Getting the source and modifying it

  1. Install the Chrome extension source viewer.
  2. Go to the page in the Chrome Web Store of the extension you want to modify.
  3. Click on the yellow CRX button in the context menu, and choose Download (screenshot).

Instead of the above you can also use the online crxviewer to download the zip.

  1. Extract the zip file.
  2. Delete _metadata folder.
  3. Read the source code, and change what needs to be changed (in your particular case, I had quickly identified that you wanted to change edit config.js and change the "channel" property). Save the changes.

Using the modified version of the extension.

  1. Visit the Chrome extension page (chrome://extensions/).
  2. Enable Developer mode, by activating the switch in the upper-right corner.
  3. Click on the "Load unpacked extension" button.
  4. Select the folder of your extension (to know which folder is correct, check whether the folder contains a file called manifest.json).
  5. Confirm. You're done.

Unless you've made a mistake in either of these steps (including the modification of the source code), the modified extension should work as intended.

Ethics

Modifying someone else's extension for personal use is not a big deal. However, do not distribute this extension without the original developer's consent. The original author has put lots of efforts in creating the extension, and might even have his/her contact details on it. If you distribute a (modified) copy of the extension, the original author cannot update the extension any more, so s/he cannot resolve bugs.
Even worse, if you turn the extension in a bad shape, users will complain to the original author, because their contact details are on it.

wOxxOm
  • 65,848
  • 11
  • 132
  • 136
Rob W
  • 341,306
  • 83
  • 791
  • 678
  • 1
    Works great, had to use this solution to solve a little issue I had when loading the unpacked extension: http://stackoverflow.com/a/29848882/1800854 – Mo Beigi Nov 27 '15 at 15:58
  • 1
    The above solution is not ideal as it messes up the locale. I ended up using this method to modify the extension: http://stackoverflow.com/a/27081397/1800854 Worked perfectly! – Mo Beigi Nov 27 '15 at 16:14
  • To summarize @Mohammad's links, if when loading the extension you get an error about not being able to read the folder `_metadata` because it starts with an underscore, the fix is just to delete the `_metadata` folder and retry. You don't need to do anything with the `_locales` folder. – Rory O'Kane Jul 11 '17 at 15:52
  • Why are the folders for the extensions named random characters? That's painful. – JackHasaKeyboard Oct 30 '17 at 06:30
  • 3
    The file names are not intended to be human readable. It's intended for resource collision avoidance and for dependency management. This is what is called "reverse engineering". It's not meant to be easy, nor for the faint of heart. It's not _meant_ to be done.. but that's also what makes it one of the most valuable ways to learn. – Metagrapher May 16 '18 at 05:23
  • Is there any way to do this with a developer extension? – Adam Fowler Nov 16 '18 at 19:45
  • CRX did not download the extension for me, anyone else have this problem and potential solutions? – merhoo Jul 01 '19 at 16:08