On Sat, Mar 19, 2016 at 6:08 PM, Сёма Мрачный <[email protected]> wrote:
> so, i'm currently inclined to something like that: >> >> twist:12334566788= >> > what about trl:// (Twister Resource Locator) or irl:// (Internal Resource > Locator or In Real Life) > > Sure, we may use a different "protocol" but i think the "//" is not required. > does "=" character mark end of URL? why, if so? > > That's actually part of the base64 string. every 3 bytes encodes to 4, but we have 8. then it adds "=" as padding. The encoded base64 thing would be two 32 integers to specify user and post >> number k. >> > help me decode your "QwAAAN0DAAA" to 2 integers. > You know you don't have to, right? Just pass into twisterd's decodeshorturl RPC and we're done. but still, if you'd like doing it step by step to check (not something we need to do in twister-html) you must first base64 decode "QwAAAN0DAAA=". This will give you 8 bytes. First 4 are the userid, little endian. Last 4 are the post number (k), little endian. --- Well... Now I know I will really need your help :-) I've tried to code some simple test here into applyHtml() but i've failed miserably... I thought I'd have a jquery element reference to change later, but then i realized the html is concatened as text... I don't know exactly how to get a reference into the formatted post that can be later changed by a callback or something. I'm confused. regards, Miguel -- You received this message because you are subscribed to the Google Groups "twister-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
