+ 13
@Tashi Yeah it's not "hack" and this demonstrates the requirement of SOP(Same-origin Policy) and the AJAX problem is also related with CORS and SOP. Well, @Serena âș Thanks.
+ 13
It's not a hack, just web crawling/scraping, but it's nice indeed ^^
[Edit] Btw, you can do it with Java, too, using e.g. Jsoup or Jaunt. But unfortunately this won't work at the code playground.
+ 7
@Retul If you want to get the user id of someone then go to their profile and click on the share button, numbers after /Profile/ in the URL is the userId and if you want to retrieve the userId of your client running your code then window.parent.userId would work if the client viewing the code is from web browser's code section.
Try this:
var cid = window.parent.userId?window.parent.userId:0;
+ 4
Nice code but how to get user ID?



