martinhrvn / userscripts

Apache License 2.0
5 stars 6 forks source link

Provide as bookmarklet, too? #1

Open alanhogan opened 9 years ago

alanhogan commented 9 years ago

Mobile Safari and other more locked-down browsers can't run user scripts, but you can easily turn this into a bookmarklet.

javascript:(function()%7Bfunction%20callback()%7Bvoid(0)%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fgithub.com%2Fkane77%2Fuserscripts%2Fraw%2Fmaster%2Fduolingo%2Flessons_progress.user.js%22%3Bif(s.addEventListener)%7Bs.addEventListener(%22load%22%2Ccallback%2Cfalse)%7Delse%20if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()

Note that I made this with "code" void(0) on this tool.