Greasy Fork is available in English.
Generic tracking/redirection/open-in-new-tab removal; Amend page title; URL redirector; and more power functionality. Has rules for Pixiv, deviantArt, twitter, youtube, blogger, Batota etc.
no Flash plugin installed and i want to be able to play embedded video
i found that Firefox will play videos if they are embedded as an iframe, but if they use the embed tag instead, then the browser is asking to install Flash
so i need to convert HTML like this:
<embed src="http://www.youtube.com/v/P9sCshUboug?version=3&hl=en_US" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" height="342" width="608">
into this...
<iframe src="https://www.youtube.com/embed/P9sCshUboug?feature=oembed" allowfullscreen="" height="340" width="604"></iframe>
converting the URL is no problem, but how do i change the opening embed tag to an iframe tag? and add the closing </iframe>
tag?
Hiya,
I really need to write the guide page. Been saying that for months :). What you need to do is edit the element key "outerHTML". You edit object keys by the prefix "=".
Assuming you already have the search-replace to change the src, the rest is something like below:
{"id":"L1430836041895","type":1,"name":"Video Example","nthNode":"0","selectors":"embed","regexes":[{"name":"convertURL","search":"YOUKNOW","replace":"YOUKNOW"},{"name":"=outerHTML","search":"","replace":""}],"enabled":true,"timestamp":1430836041895}
Just replace the convertURL rule first. Hope that makes sense.
(FYI: There is an edit post option under the cog menu on the right side.)
strange - i checked this thread today and didn't see your reply - sorry :)
since "src" is not present in your example rule, i really have no idea what i'm doing now
what goes in the outerHTML search and replace?
I didn't check what came out. It removed all the element tags when posted as it treated it as html. Using markdown should fix the issue.
{"id":"L1430836041895","type":1,"name":"Video Example","nthNode":"0","selectors":"embed","regexes":[{"name":"convertURL","search":"YOUKNOW","replace":"YOUKNOW"},{"name":"=outerHTML","search":"<embed.+src=\"([^\"]+)\".+>","replace":"<iframe src=\"$1\" height=\"340\" width=\"604\"></iframe>"}],"enabled":true,"timestamp":1430836041895}
Copy and paste the above into the Paste Rules
dialog. Make changes accordingly. (convertURL rule is the part where you change the src)
help with video embed rule
screwed up - see next post...