---
{
	"title": "Exit script",
	"language": "en",
	"category": "Plugins",
	"categoryfile": "plugins",
	"description": "Redirects users to another sites.",
	"altLangPrefix": "exitscript",
	"dateModified": "2020-06-19"
}
---

<section>
	<h2>Purpose</h2>
	<p>Redirects users to another sites.</p>
</section>

<section>
	<h2>Working example</h2>
	<ul>
		<li><a href="../../../demos/exitscript/exitscript-en.html">English example</a></li>
		<li><a href="../../../demos/exitscript/exitscript-fr.html" hreflang="fr">French example</a></li>
	</ul>
</section>
<section>
	<h2>How to implement</h2>
		<ol>
			<li>Add a class <code>wb-exitscript</code> on selected URL.</li>
			<li>Add a <code>data-wb-exitscript</code> attribute on the link element and specify a redirect URL.</li>
		</ol>
</section>
<section>
	<h2>Configuration options</h2>
	<table class="table">
		<thead>
			<tr>
				<th>Option</th>
				<th>Description</th>
				<th>How to configure</th>
				<th>Values</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td><code>msgboxHeader</code></td>
				<td>Change message box title</td>
				<td>Add <code>"i18n":{ "msgboxHeader": "Avertissement de sortie"}</code> to the <code>data-wb-exitscript</code> attribute.</td>
				<td>Your custom message box title</td>
			</tr>
			<tr>
				<td><code>exitMsg</code></td>
				<td>Show custom message</td>
				<td>Add <code>"i18n":{ "exitMsg": "This is a custom message."}</code> attribute.</td>
				<td>Your custom message</td>
			</tr>
			<tr>
				<td><code>targetWarning</code></td>
				<td>Show custom message</td>
				<td>Add <code>"i18n":{ "targetWarning": "This is a custom message."}</code> attribute.</td>
				<td>Your custom message</td>
			</tr>
			<tr>
				<td><code>yesBtn</code></td>
				<td>Change the "Yes" button label</td>
				<td>Add <code>"i18n":{ "yesBtn": "Sure"}</code> to the <code>data-wb-exitscript</code> attribute.</td>
				<td>Your custom label</td>
			</tr>
			<tr>
				<td><code>cancelBtn</code></td>
				<td>Change the "Cancel" button label</td>
				<td>Add <code>"i18n":{ "cancelBtn": "Nope"}</code> to the <code>data-wb-exitscript</code> attribute.</td>
				<td>Your custom label</td>
			</tr>
			<tr>
				<td><code>.wb-exitscript-urlparam</code></td>
				<td>Retrieves the original URL</td>
				<td>Add class <code>.wb-exitscript-urlparam</code> to the container <code><span class="wb-exitscript wb-exitscript-urlparam"></span></code>.</td>
				<td>Your custom label</td>
			</tr>
		</tbody>
	</table>
</section>
<section>
	<h2>Source code</h2>
	<p><a href="https://github.com/wet-boew/wet-boew/tree/master/src/plugins/exitscript">Exit script code on GitHub</a></p>
</section>
