Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated SudokuSolverNL -> CTC bookmarklet #41

Open
killroy42 opened this issue Jul 30, 2021 · 0 comments
Open

Updated SudokuSolverNL -> CTC bookmarklet #41

killroy42 opened this issue Jul 30, 2021 · 0 comments

Comments

@killroy42
Copy link

Hi, i've updated the bookmarklet so it also works on the tweets on twitter.com directly. It uses the first tweet on the page. I was using it a lot and wanted to save a click!

Source:
(([,v,p])=>window.open('//test.crackingthecryptic.com/sudoku/scf'+(_=>p.replace(/\\d0{0,5}/g,i=>(i=+i[0]+10*i.length-10)<10?i:String.fromCharCode(i+(i<36?55:61))))()+({xsudoku:'x',foursquare:'w',x4square:'wx'}[v]||'')))('undefined'!=typeof angular?(({puzzle:p,variant:v})=>[,v,p])(angular.element(document.body).scope().queryParams):[...document.querySelectorAll('a[target="_blank"]')].map(a=>a.textContent.match(/puzzle\/(?:([^\/]+)\/)?([0-9]+)/)).filter(_=>_)[0])

Bookmarklet:
javascript:(_=%3E((%5B,v,p%5D)=%3Ewindow.open('//test.crackingthecryptic.com/sudoku/scf'+(_=%3Ep.replace(/%5C%5Cd0%7B0,5%7D/g,i=%3E(i=+i%5B0%5D+10*i.length-10)%3C10?i:String.fromCharCode(i+(i%3C36?55:61))))()+(%7Bxsudoku:'x',foursquare:'w',x4square:'wx'%7D%5Bv%5D%7C%7C'')))('undefined'!=typeof%20angular?((%7Bpuzzle:p,variant:v%7D)=%3E%5B,v,p%5D)(angular.element(document.body).scope().queryParams):%5B...document.querySelectorAll('a%5Btarget=%22_blank%22%5D')%5D.map(a=%3Ea.textContent.match(/puzzle%5C/(?:(%5B%5E%5C/%5D+)%5C/)?(%5B0-9%5D+)/)).filter(_=%3E_)%5B0%5D))()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant