How to extract PrototypeJS(?) vars: possibilities, techniques, permalinks, etc

Viewed 36

On some sites users have account numbers, on others nicknames; one can represent the other and vise-versa. Or not. On some sites when the username is changed, all the links in their uploads, posts, and comments break completely. KAT.CR is one of those sites. Which is weird because there is a corresponding alphanumeric hash, it just isn't tied to the nickname. This may be leftover from when changes to ones name led to an update, not a "broken user link." In fact this question was asked there first snd a staff member responded that the functionality was withdrawn. No reason was given. This is just an example, there are lots of sites that do this, or make other changes that cause links to break.

Rather than linking to static destination, I would like to write a script that 1. queries a database or subdomain for a pre-specified user id 2. returns the current username, 3. runs a redirect script to the updated profile page for the current user.

If it was my site and I wished to link to my profile here, for example, I would just manually update the url. I used this example because uploads include links in their torrents that cant be updated.

Below is one of several javascripts that appears at the top of every page when logged in a KAT. I am not certain which, if any of the values are a permanent fixture of the account or how/where such a script would search in order to perform the task I described... I would just like to know if the concept is viable.

<script type="text/javascript">
    +function(S,p,a,r,e,C,l,i,c,k)
    { S[r]=S[r]||[];S[e]||(S[e]=function(){
    S[r].push(Array.prototype.slice.call(arguments)) });
    i=p.createElement(a);c=p.getElementsByTagName(a)[0];
    i.src=C;i.async=true;c.parentNode.insertBefore(i,c)}
    (window,document,'script','_scq','sc', '//a.kickass.to/sc-8cce154.js');

    sc('setHost', 'a.kickass.to');
    sc('setAccount', '32 digit alphanumeric');
        var kat = {
        release_id: '8cce154',
        detect_lang: 0,
        spare_click: 1,
        mobile: false
    };
    var katUser = {
        idhash: '28digitalphanumeric',
        channel: 'another28digitalphanumeric',
        nickname: 'username',
        avatar: '//yuq.me/userpics/10/100/userpic.png',
        acl: 1,
        disable_sounds: 0,
        disable_animated_upics: 0        };
</script>
0 Answers
Related