View Single Post
  #57  
Old 10.06.2020, 17:42
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 939
Default

Quote:
Originally Posted by Dockel View Post
... with YouTube links ... Is there a way to treat all of the different variations of the same videos as duplicates? ...
In the script, replace:
Code:
var url = link.getContentURL() || link.getPluginURL();

with:
Code:
var url = link.getHost() == "youtube.com" ? link.getContainerURL() : link.getContentURL() || link.getPluginURL();

You can manually strip the variant string (following the video ID) from the urls which already exist in your 'history' file. (Keep a backup of the file, just in case).

Example string to remove from url:
Code:
#variant=ew0KICAiaWQiIDogIk1QNF9IMjY0XzM2MFBfMzBGUFNfQUFDXzk2S0JJVCIsDQogICJkYXRhIiA6ICJ7XHJcbiAgXCJhQml0cmF0ZVwiIDogLTEsXHJcbiAgXCJoZWlnaHRcIiA6IDM1MixcclxuICBcIndpZHRoXCIgOiA2NDAsXHJcbiAgXCJmcHNcIiA6IDI5LFxyXG4gIFwicHJvamVjdGlvblwiIDogXCJOT1JNQUxcIlxyXG59Ig0KfQ%3D%3D
Reply With Quote