LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-19-2015, 02:14 AM   #1
linuxlicious
Member
 
Registered: May 2011
Posts: 87

Rep: Reputation: 6
Is there an easy way to run a script when clicking on a link in a browser?


I like to use the Surf browser a lot, but it doesn't understand html5 and I don't like using Flash, so to watch youtube (and other) videos, I use a little script (I modified it though to avoid youtube-dl, which gave me trouble), which is posted at suckless.org under the page for Surf. However, the thing about the script is that you have to click on the youtube/video link and then press a key combo (ctrl+w) to call up the script. While it works fine like that, it seems a bit awkward and I can't help but think there has to be a better way. So I was wondering if there was a way to run the script when I click on a youtube (or any other video) link? Any suggestions are welcome.

PS: I run Arch+Spectrwm along with a few other apps for daily use.

Last edited by linuxlicious; 11-19-2015 at 02:21 AM.
 
Old 11-20-2015, 01:06 PM   #2
Perceptor
Member
 
Registered: Jul 2007
Location: the Future
Distribution: Slackware
Posts: 128

Rep: Reputation: 64
You can try clipboard monitoring with a specific filter, which calls the script in question when a link is copied. This solution is browser-independent and does not introduce security risks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script should run clicking on desktop icon on openbox beaglebone black. sd.israr@gmail.com Linux - Embedded & Single-board computer 2 01-03-2015 06:04 AM
[SOLVED] Perl script wont run - no error, no nothing (this *should* be easy!) Sly Phy Programming 1 08-08-2010 01:41 PM
Click link in Browser-Run script kennybob General 6 04-06-2007 02:23 PM
.sh Script to run another via browser GetMooked Linux - Software 1 05-12-2005 04:41 PM
How to run a script by double clicking it tom221 Linux - Newbie 6 02-07-2005 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration