![]() |
Noob needs help (chrome extension)
Hey. To be perfectly honest, i don't know ANY JS coding what so ever.
I know some C#, so i understand the basic behind the JS coding... My problem is probably simple (for those of you who knoe JS). Since youtube updated theyre UI, i have been constantly annoyed with all the "recommended for you" videos appearing. So i downloaded a chrome extension wich redirects you from "youtube.com" to "youtubecn.com" (youtube for countries where normal youtube is blocked). I thought i could simply change "youtubecn.com" to "youtube.com/feed/subscriptions". Turns out it wasnt that easy as the extension detects that the only thing between "www." and ".com" is "youtube" in both cases instead of "youtubecn" Can someone please make this redirect me from "youtube.com" to "youtube.com/feed/subscriptions"? :) Code:
var l=location.href; |
Did this. Solved the problem (slitely... cant watch videos without going to youtube.com/feed/subscriptions)
Code:
var l=location.href; |
You have to use a regular expressions (defined with to / delimiters or new RegExp(string)) with the methods : replace, match or test (which simply return a boolean on success).
Some caution is needed with addresses that contain special characters such as dots (which represents any characters in regular expressions and must be preceded by a backslash to regain their initial sense) and slashes (the delimiters which must too be preceded by a backslash). Then the right syntax could be Code:
|
Quote:
If you are using google chrome and would like to try out to find a code that works: Download: https://chrome.google.com/webstore/d...hecaiacd?hl=en then go to: C:\Users\[Your user name]\AppData (may be a hidden folder)\local\google\Chrome\User Data\Default\Extensions Then find the folder wich contains the youtube mirror extension. For me its: ffnjkadalnonednoaalcmebihecaiacd Edit "ytm.js" until the extension works :P (Everytime you have edited ytm.js you need to restart chrome). |
| All times are GMT +1. The time now is 07:18 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.