Fixes for remoteSearchDriver.js and related. Untested, probably doesn't work. Somewhat less complete than r59278, I haven't done the comments and some bad variable names remain.
* Fixed multiple occurrences of </br> where <br/> was meant
* Made getSelection() into an accessor for this.caret_pos
* Split getTexboxSelection() into three accessors
* Merged init_interface_bindings() with initDialog()
* Split off showUploadForm_internal() from showUploadForm()
* Moved the upload check in showSearchTab() to its own function showCurrentTab()
* Moved the result display section of waitForResults() to a callback
* Removed the instance_name hack
* Fixed unanchored regex /res_/
* Split doMediaEdit() into showImageEditor() and showVideoEditor()
* Fixed unanchored regex /File:|Image:/
* Split updatePreviewText() into accessors getPreviewText() and getEmbedCode()
* Moved the doImportInterface() call from checkPrefixNameImport() to the checkImportResource() caller
* Use consistent spelling for "license"
Promoted anonymous functions to methods:
* getUploadForm_internal
* getResultHtml
Renamed functions:
* getlicenseImgSet -> getLicenseIconHtml
* setDispMode -> setDisplayMode
* getParsedWikiText -> parse
* init_modal -> createDialogContainer
* init_interface_html -> initDialog
* doUploadInteface -> showUploadTab
* getUploadForm -> showUploadForm
* runSearch -> showSearchTab
* checkResultsDone -> waitForResults
* drawOutputResults -> showResults
* loadHQImg -> loadHighQualityImage
* resourceEdit -> showResourceEditor
* cancelClipEditCB -> onCancelClipEdit
* checkRepoLocal -> isProviderLocal
* checkForFile -> findFileInLocalWiki
* checkImportResource -> isFileLocallyAvailable
* checkPrefixNameImport -> isFileAlreadyImported
* doImportInterface -> showImportUI
* doImportAPI -> doApiImport
* previewResource -> showPreview
* getResourceObjet -> getResourceObject