tag:blogger.com,1999:blog-9453241.post4471334559725632249..comments2024-01-22T23:57:51.851-07:00Comments on Phase Portrait: Copying lyrics from Pandora to your clipboardTed Pavlichttp://www.blogger.com/profile/15297790411942050417noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-9453241.post-69933336306905741202012-03-15T15:10:25.314-07:002012-03-15T15:10:25.314-07:00Karl -- Good insight. However, wouldn't it be ...Karl -- Good insight. However, wouldn't it be nicer to package that script not as a bookmarklet but a GreaseMonkey script instead? That way everything would be selectable by default.<br /><br />GreaseMonkey scripts require the GreaseMonkey add-on in Firefox, but they are supported natively by Chrome. So if you use Chrome, your modification is just as easy to make as adding a bookmarklet.Ted Pavlichttps://www.blogger.com/profile/15297790411942050417noreply@blogger.comtag:blogger.com,1999:blog-9453241.post-46717245905825122302012-03-15T03:51:11.191-07:002012-03-15T03:51:11.191-07:00Sorry to bring up such an old topic, but you can u...Sorry to bring up such an old topic, but you can use a simple bookmarklet that I coded to remove all of the attributes that make it unselectable. That way you can just click the bookmarklet when you want to copy lyrics and you don't have to hassle with disabling any plugins or use extra addons. Simply copy everything below and add it to the "URL" box of a new bookmark:<br /><br />javascript:(function(){<br /> var divs = document.getElementsByTagName('div');<br /> var div;<br /> var divClass;<br /> var i = 0;<br /> var numHad = 0;<br /> for (i = 0; i < divs.length; i++) {<br /> div = divs[i];<br /> divClass = div.getAttribute("class");<br /> if ((divClass == "lyricsText unselectable") || (divClass == "unselectable")) {<br /> numHad++;<br /> div.setAttribute("class", "lyricsText");<br /> div.setAttribute("unselectable", "off");<br /> div.setAttribute("onmousedown", null);<br /> div.setAttribute("onclick", null);<br /> div.setAttribute("ondragstart", null);<br /> div.setAttribute("onselectstart", null);<br /> div.setAttribute("onmouseover", null);<br /> }<br /> }<br /> if (numHad > 0) { alert("Made " + numHad + " tags selectable! :D"); }<br />})()Anonymoushttps://www.blogger.com/profile/09888336809215570123noreply@blogger.comtag:blogger.com,1999:blog-9453241.post-83945602196895452492011-12-07T20:23:41.629-07:002011-12-07T20:23:41.629-07:00If using firebug you can also just remove all the ...If using firebug you can also just remove all the style, onclick, onmouseover etc for the div the lyrics are contained in. That's where all the "protective" logic is contained, for now...m1noreply@blogger.comtag:blogger.com,1999:blog-9453241.post-15768126396933309882010-10-15T13:35:21.801-07:002010-10-15T13:35:21.801-07:00That's a really excellent point.
The only dow...That's a really excellent point.<br /><br />The only downside is that you might want the context menus to be replaced on some sites (e.g., to allow right clicking in Google Docs).<br /><br />It wouldn't surprise me if there was an add-on (perhaps somewhere in the configuration for NoScript?) that lets you customize JavaScript settings on a site-by-site basis.Ted Pavlichttps://www.blogger.com/profile/15297790411942050417noreply@blogger.comtag:blogger.com,1999:blog-9453241.post-30048406683715782582010-10-15T12:58:43.098-07:002010-10-15T12:58:43.098-07:00You can actually do this a little easier, without ...You can actually do this a little easier, without any addons. Go into your Options page, select the Content tab, and click the Advanced button next to "Enable Javascript". There you can choose to not allow scripts to disable context menus.<br /><br />Of course, you can also use Select All to copy all text of the page into notepad, where you can cut out everything except the lyrics.Anonymoushttps://www.blogger.com/profile/10340456442589167320noreply@blogger.com