Bump for my post above. I think that doing that robots.txt thing or htaccess or whatever should be discussed.
@Lorenzo> I'm surprised a CDN not advertised on jquery.com would offer it..? Anyway, isn't this only for cloudflare customers?
I wouldn't be fussed over whether we should add it or not, but I just don't know if they're going to keep up with jQuery's releases,
precisely because they're not officially sanctioned. It'd be a disaster if I started having to check whether all CDNs provide the version I'm targeting... Right now I'm only doing a special test for beta versions -- forcing the CDN to code.jquery.com (which is the only one to host beta versions), in case a beta or RC tag is found in the filename. (I think that one's a good idea.
:cool:)
! Did I mention that I love the @language embedding into script files?
I'm not sure, but that's the idea
:)I've had a look at your code, and you're too kind with suggest.js, you shouldn't have kept the opt.sTextDeletItem stuff at all I'd say...
;) Who's going to change it anyway..? A plugin? Bad semantics, bad karma!
Also, I was thinking we could rename pm.js to member.js and instead include in that file all of the small functions that aren't targeted to guests... e.g. the draft auto-save, things like that. But if it forces members to load the PM JS code on every page where draft auto-saving is required (for instance), it might not be that helpful.
Haven't looked at all the functions that could benefit from being moved there.
Set a default string from index, set it once and never have to explicitly set it again in any of the multiple places it is called (unless you *really* want to).
Yup, definitely the idea
;)All this for the 'delete item' help text on the auto suggest... it's the same everywhere, so just embed it in to the suggester as a default! It bugged me, mkay? (all files)
Yep yep yep, my you're scaring me!
:lol:@ And since it's now embedded in the suggest file, it will not only be gzipped and cached, it no longer has to be inlined into all the pages it's in, or declared in those pages where used. I would imagine that's actually a tidy little saving everywhere that uses the auto suggester, all in all. Every little helps.
Okay, seriously... Have I started tainting you with my madness? I'm so sorry...
:^^;:Anyway, I did a few @language stunts when I implemented the thing, then I pretty much stopped because of a bug which I only fixed recently, and then I was too busy with other things to think of it.
I looked into the code and found some more...
- txt.done in spellcheck.js -- however, I'd advise against adding it for one reason: if you're not using the default language, you'll get another instance of your language name in the spellcheck JS URL, while the txt.done string seems to be initialized only in the spellcheck popup. Actually, I'd be interested in knowing why spellcheck.js is loaded at all in the editor, when all of the operations are done from the popup (which can load the JS file by itself...)
- your very own draft auto-save code
:) I don't think there's anything preventing that one from being passed on.
- the YUI uploader -- we need to rewrite it to use HTML5, by the way...
:-/- the upshrink description for toggles could be a 'default' instead of being explicitly set (it's the only text string that's actually sent to them, except from a few "-" here and there.) Either with something like altExpanded: 'default', or not setting it at all in the HTML -- although we'd have to ensure that it 'works' on all toggles that don't specify an alt. It's important to check on this one -- it's on every single page!
:)- message_txt_delete in wedgeAttachSelect is a given
:)- register.js always uses the same regTextStrings, with the Register page adding a few strings compared to the Reminder page. We could, instead of sending the text strings, send a boolean determining whether register.js will use one set of strings or the other.
That's all I could find for now... (Okay, "forever", since I'm unlikely to do that again!)
I searched through "JavaScriptEscape($txt", by the way, in case you know of a few places where we don't sanitize the strings when passing them to JS. I don't think there are any
;)Do you want to do them all, or split the job, or let me do them?
Whichever you prefer. Right now I'm busy at work on splitting skeleton stuff anyway.