Page 30 of 33

Prevent users from accidentally leaving the page [JavaScript]

Sometimes your users might lose important information that they’ve been working on by accidentally leaving the page. They can either press the “previous page” or “next page” button by accident, or they can hit the “backspace” key on their keyboard, inadvertently click a link etc.

Luckily you can prevent them from losing their progress by using the following bit of JavaScript code:

window.onbeforeunload = function() {
    if (your_users_might_lose_their_work) {
        dialog_text = "IMPORTANT: Are you sure you want to leave this page?\n\n";
        dialog_text += "WARNING: If you leave this page, you will lose all your current progress.";
        return dialog_text;
    }
};

This code works perfectly fine with all modern browsers, with one small disclaimer: Firefox will not show your custom warning to your users, instead it will simply state “This page is asking you to confirm that you want to leave – data you have entered may not be saved.” However, that’s exactly what you usually want to say in this situation anyway.

What a lovely Sunday!

I couldn’t be much happier right now … Everything’s great, we’re making great progress, we’re getting ready to finally launch Spin Rewriter to the general public and I was relaxing at the beach, lazily checking my email inbox on this lovely Sunday when I received yet another brilliant testimonial from one of our Beta Testers:

I have been testing spinrewriter and its pretty damn good. Still a few tweaks to work out with some phrases that it creates but definitely better than anything I have ever seen.

We’ve been getting more and more feedback just like this one lately and we couldn’t be happier. Our unique approach is turning out to be exactly what we thought it would be, and we’ll be bringing the Number 1 Rewriting Software to the market very very soon.

Once again, stay tuned! 😀

Love you all! 😀

We’re getting a ton of suggestions – a big Thank You!

I just wanted to once again publicly thank all of our Beta Testers who are doing incredible work in helping us make a superb product!

We’re constantly getting great feedback and based on this feedback we’ll be soon be adding great little tweaks such as:

– While users are in the Edit Mode (actively working on their articles), they will be warned if they click the “previous page” or “next page” button in their web browser or they want to leave the page without saving their progress. What does this mean? It means that our users will never lose their hard work and all the rewriting progress they’ve done with their articles by accidentally pressing the “backspace” key on their keyboards which takes you to the previous page.

– Users will soon be able to select phrases that span over punctuation marks, e.g. they will be able to select the phrase “the red, white and blue” that they currently cannot and replace it with “the American flag”.

– Users will be able to simply click on the underscore (underline) of already suggested phrases to select them, instead of manually selecting them by dragging their mouse over them.

As you can see, we’re working pretty hard, so – stay tuned! 😀

Improved spintax fixing

We’ve just further improved our Syntax Fixer or Spintax Fixer, whatever you prefer.

As you probably already know, in the final step of the process Spin Rewriter changes “A {man|guy} ate an {apple|banana}.” to “{A man|A guy} ate {an apple|a banana}” to make sure that all indefinite articles are correct.

You see, the original syntax could have produced “A man ate an banana.” which is clearly wrong – the new syntax properly produces the sentence “A man ate a banana.”

With the latest update we taught our Syntax Fixer to differentiate between the ' character when it’s used as an apostrophe as opposed to when it’s used as a quotation mark. We believe it’s pretty much perfect now, hooray! 😀

Another big update

We’ve just rolled out another important update for the new article rewriting system Spin Rewriter.

This time we focused on improving the artificial intelligence behind it to make it understand your articles even better. We implemented two important additional natural language processing methods (our colleagues over at Stanford and Princetion have been toying around with them for a while now) and we couldn’t be happier with the results. Spin Rewriter now correctly understands over 94% of the tricky ambiguous words with many meanings, and 100% of all other words of course.

If you want to see it in action, sign up and become one of our Beta Testers! 😀

Spin Rewriter is even faster now

With yesterday’s update we managed to cut down the post-processing time (when our software is actually learning from the changes you applied to your article so it can get even better in time) a whopping 82-84%!

This means that the user experience is even smoother now, and once you click the “Continue to the Final Step” you don’t have to wait for more than a couple of seconds. If you have a good internet connection, it actually takes less than 1 second to take you to the final step. 😀

Stay tuned, we’re working hard!

A major update

Just this morning we rolled out one of the major updates of our new article rewriter, called Spin Rewriter.

This includes an even faster user interface, 65% shorter pre-processing time (when our software is figuring out the exact meaning of each word of your text), it also takes 25% less time to generate and sort lists of relevant synonyms now, and the One-Click Rewrite option almost never crashes any more. 😉

Pretty good for a beta product, right? 😀

Get HTML of selection [JavaScript]

I just recently needed to get the actual HTML of what was selected in a browser. Selected as in “you drag your mouse across some text and it turns blue”. So I came up with this nifty piece of JavaScript code that works quite flawlessly across all major browsers (yes, including IE).

/**
 * gets the current selection, including HTML code
 * @return string
*/
function getSelectionHTML() {
	var userSelection;
	try {
		if (window.getSelection) {
			// W3C ranges
			userSelection = window.getSelection();
			if (userSelection.getRangeAt)
				var range = userSelection.getRangeAt(0);
			else {
				var range = document.createRange();
				range.setStart(userSelection.anchorNode, userSelection.anchorOffset);
				range.setEnd(userSelection.focusNode, userSelection.focusOffset);
			}
			var clonedSelection = range.cloneContents();
			var div = document.createElement("div");
			div.appendChild(clonedSelection);
			return div.innerHTML;
		} else if (document.selection) {
			// Internet Explorer selection
			userSelection = document.selection.createRange();
			return userSelection.htmlText;
		} else {
			return "";
		}
	} catch(e) {
		// an error occurred - supposedly nothing is selected
		return "";
	}
};

Why you *should be* excited about Spin Rewriter

Let’s face it, today’s article rewriters can be pretty dumb. They can’t tell the difference between the word “book” in “John will book a hotel room.” and the word “book” in “John will read a book.”

What’s more they always suggest “is going to” and “are going to” for the word “will”. If the original sentence is “John will do this”, then “are going to” doesn’t make much sense, does it? If the original sentence is “Such was his will.” then the situation is even worse. 😉

However, in the last 4 years we experienced a number of incredibly important discoveries in the text manipulation field of Computer Science. With our current technology we’re able to create the best article rewriter the world has ever seen!

What can you really expect from Spin Rewriter? Spin Rewriter means that:

  • You can rewrite your articles using our intelligent One-Click Rewrite system
  • You can create new articles automagically using our collection of 750,000 synonyms
  • You can export articles with the {first option|second option} spintax
  • You can create absolutely unique articles and export hundreds of them at once
  • You can select the desired level of uniqueness of generated articles
  • You can have our software learn your style of writing
  • You can totally dominate everybody else with tons of unique content

And best of all? It’s free at the moment – just sign up to be one of our Beta Testers! 😀

Is someone “borrowing” your content?

Nobody likes it when their very own content ends up on some website that simply “borrowed” it. Luckily there’s a way for you to find everyone who borrows your content. It’s called CopyScape and it’s extremely intuitive, so you’ll most certainly be able to figure out how to use it.