Monday, October 20, 2014

Always expand YouTube video descriptions

I never understood the point of creating website content and then persistently hiding it from users. Do stores put their merchandise on top of tall greased poles to improve sales?  With Google continually finding ways to obfuscate interfaces for no clear reason, I'm reluctantly conditioned to lose hope in the suspicion that the defining characteristic of the modern web is waste without reason -- but masturbatory social media should have made that conclusion obvious long ago.  It's a world of greased poles either way. 

Today's drop in the sea, the pinprick distracting from a thousand knife wounds, is the YouTube video watch page.  Why hide the video description? Fix that fucking shit with YARIP.  The following ugly attribute deletion expands the description, and the second XPATH removes the more/less buttons.
//div[@id='action-panel-details']/attribute::class
//div[@id='action-panel-details']/button
As an alternative and more appropriate approach, instead of using the first line to delete the class attribute for 'action-panel-details', YARIP can be configured to perform an attribute substitution.  From the YARIP's page manager, under the attribute tab, the class attribute for the 'action-panel-details' element can be simply set to
'action-panel-content yt-card yt-card-has-padding yt-uix-expander'
As a bonus, try this in YARIP to get rid of a fraction of the unrelated garbage in the sidebar. 
//li[child::a/span[text()="Recommended for you"]]
I'd like to find a way to fix the comment sorting, but I haven't had much luck so far.  It's not exactly as if I know what I'm doing.

Alternatively, the expansion itself can be accomplished using a userscript.   I use Scriptish, but Greasemonkey may also work. 
// ==UserScript==
// @name          YouTube Show Description
// @description   show the full description for fucks sake
// @namespace     http://www.stopbreakingyoutubeyouassholes.com
// @include       https://www.youtube.com/watch?*
// ==/UserScript==

document.getElementById('action-panel-details').className = 'action-panel-content yt-card yt-card-has-padding yt-uix-expander';

No comments:

Post a Comment