Tag Archives: snippet

SNIPPET: TINYMCE – WYSIWYG EDITOR IMPLEMENTATION

TinyMCE Integration For UBotOn UBot forum I’ve noticed that no one knows (or want to share info on) how to implement WYSIWYG (what you see if what you get) editor, that’s why I’ve decided to publish a snippet I was using for a while now. In case you don’t know what WYSIWYG editor is, it’s an advanced text editor that will allow you/your users to format text without needing to write HTML code. In this snippet we are using a popular and widely used TinyMCE.

Continue reading «SNIPPET: TINYMCE – WYSIWYG EDITOR IMPLEMENTATION»

SNIPPET: LOAD VALID PROXIES & CHANGE PROXY

Proxy Change SnippetBellow is a simple snippet which will load valid proxies from TXT file and make them ready to be used inside UBot. Proxies are loaded to a list with name %PROXIES and whenever we want to change a proxy we just need to tell UBot which list item should be used as proxy.

Continue reading «SNIPPET: LOAD VALID PROXIES & CHANGE PROXY»

SNIPPET: SAFE NAVIGATE

When using UBot navigate command you usually want to make sure that the page you are trying to load really gets loaded, and beside that when using proxies you may also want to re-try loading the page, in case proxy was down when UBot tried to load the page or if the proxy may not work at all. So to make your software more robust you should use some checks after navigate commands, to make sure that the page you are expecting to load has actually loaded and if not, a command that will try to load it again.

Continue reading «SNIPPET: SAFE NAVIGATE»

SNIPPET: OPEN URL IN DEFAULT BROWSER

In some cases you would want the URL to open in users default browser, instead of opening itself in UBot’s one, and for example that way replacing the custom HTML that you’ve generated previously.

Bellow is a simple UBot script that will open links clicked in UBot browser in users default browser. JQuery part of the code is written the way that it only applies that behavior to links that have attribute target=”_blank”  set , so other links will still get opened as usual. In case that invalid URL (not starting with “http”) is passed into the command, it will return “” (blank string) without opening the default browser.

SNIPPET & TEST CODE (UBOT AND JQUERY):

Continue reading «SNIPPET: OPEN URL IN DEFAULT BROWSER»