diff --git a/wp-content/plugins/autopost-to-mastodon/client.php b/wp-content/plugins/autopost-to-mastodon/client.php
new file mode 100644
index 0000000000000000000000000000000000000000..ce1d044b9963873109ba0b0449430d4abff886a9
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/client.php
@@ -0,0 +1,161 @@
+<?php
+class Client
+{
+	private $instance_url;
+	private $access_token;
+	private $app;
+
+	public function __construct($instance_url, $access_token = '') {
+		$this->instance_url = $instance_url;
+		$this->access_token = $access_token;
+	}
+
+	public function register_app($redirect_uri) {
+
+		$response = $this->_post('/api/v1/apps', array(
+			'client_name' => 'Mastodon Share for WordPress',
+			'redirect_uris' => $redirect_uri,
+			'scopes' => 'read write',
+			'website' => $this->instance_url
+		));
+
+		if (!isset($response->client_id)){
+			return "ERROR";
+		}
+
+
+		$this->app = $response;
+
+
+		$params = http_build_query(array(
+			'response_type' => 'code',
+			'scope' => 'read write',
+			'redirect_uri' => $redirect_uri,
+			'client_id' =>$this->app->client_id
+		));
+
+		return $this->instance_url.'/oauth/authorize?'.$params;
+	}
+
+	public function verify_credentials($access_token){
+
+		$headers = array(
+			'Authorization'=>'Bearer '.$access_token
+		);
+
+		$response = $this->_get('/api/v1/accounts/verify_credentials', null, $headers);
+
+		return $response;
+	}
+
+	public function get_bearer_token($client_id, $client_secret, $code, $redirect_uri) {
+
+		$response = $this->_post('/oauth/token',array(
+			'grant_type' => 'authorization_code',
+			'redirect_uri' => $redirect_uri,
+			'client_id' => $client_id,
+			'client_secret' => $client_secret,
+			'code' => $code
+		));
+
+		return $response;
+	}
+
+	public function get_client_id() {
+		return $this->app->client_id;
+	}
+
+	public function get_client_secret() {
+		return $this->app->client_secret;
+	}
+
+	public function postStatus($status, $mode, $media = '', $spoiler_text = '') {
+
+		$headers = array(
+			'Authorization'=> 'Bearer '.$this->access_token
+		);
+
+		$response = $this->_post('/api/v1/statuses', array(
+			'status' => $status,
+			'visibility' => $mode,
+			'spoiler_text' => $spoiler_text,
+			'media_ids[]' => $media
+		), $headers);
+
+		return $response;
+	}
+
+	public function create_attachment($media_path) {
+
+		$filename =basename($media_path);
+		$mime_type = mime_content_type($media_path);
+
+		$boundary ='hlx'.time();
+
+		$headers = array (
+			'Authorization'=> 'Bearer '.$this->access_token,
+			'Content-Type' => 'multipart/form-data; boundary='. $boundary,
+		);
+
+		$nl = "\r\n";
+
+		$data = '--'.$boundary.$nl;
+		$data .= 'Content-Disposition: form-data; name="file"; filename="'.$filename.'"'.$nl;
+		$data .= 'Content-Type: '. $mime_type .$nl.$nl;
+		$data .= file_get_contents($media_path) .$nl;
+		$data .= '--'.$boundary.'--';
+
+		$response = $this->_post('/api/v1/media', $data, $headers);
+
+		return $response;
+	}
+
+	private function _post($url, $data = array(), $headers = array()) {
+		return $this->post($this->instance_url.$url, $data, $headers);
+	}
+
+	public function _get($url, $data = array(), $headers = array()) {
+		return $this->get($this->instance_url.$url, $data, $headers);
+	}
+
+	private function post($url, $data = array(), $headers = array()) {
+		$args = array(
+		    'headers' => $headers,
+		    'body'=> $data,
+		    'redirection' => 5
+		);
+
+		$response = wp_remote_post( $this->getValidURL($url), $args );
+		$responseBody = wp_remote_retrieve_body($response);
+
+		return json_decode($responseBody);
+	}
+
+	public function get($url, $data = array(), $headers = array()) {
+		$args = array(
+		    'headers' => $headers,
+		    'redirection' => 5
+		);
+
+		$response = wp_remote_get( $this->getValidURL($url), $args );
+		$responseBody = wp_remote_retrieve_body($response);
+
+		return json_decode($responseBody);
+	}
+
+	public function dump($value){
+		echo '<pre>';
+		print_r($value);
+		echo '</pre>';
+	}
+
+	private function getValidURL($url){
+		 if  ( $ret = parse_url($url) ) {
+ 			if ( !isset($ret["scheme"]) ){
+				$url = "http://{$url}";
+			}
+		}
+		return $url;
+
+	}
+}
diff --git a/wp-content/plugins/autopost-to-mastodon/form.tpl.php b/wp-content/plugins/autopost-to-mastodon/form.tpl.php
new file mode 100644
index 0000000000000000000000000000000000000000..c44a438c76f1bba56b51734bb0131ed9fbfe7885
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/form.tpl.php
@@ -0,0 +1,140 @@
+<?php 
+define("ACCOUNT_CONNECTED",isset($account) && $account !== null);
+define("ADVANCED_VIEW",false);
+?>
+
+
+<div class="wrap">
+	<h1><?php esc_html_e( 'Mastodon Autopost Configuration', 'autopost-to-mastodon' ); ?></h1>
+
+	
+	<br>
+	
+	<a href="https://github.com/simonfrey/mastodon_wordpress_autopost" target="_blank" class="github-icon" target="_blank">
+		<svg aria-hidden="true" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
+	</a>
+
+	<a href="https://liberapay.com/Mastodon-Auto-Share-Team/donate" target="_blank"><img src="<?php echo plugins_url( 'img/donate.svg', __FILE__ );?>"></a>
+<br>
+<br>
+	<?php if(ACCOUNT_CONNECTED): ?>
+			<input type="button" class="button active tab-button" value="<?php esc_attr_e( 'Simple configuration', 'autopost-to-mastodon' ); ?>" id="hide_advanced_configuration">
+			<input type="button" class="button tab-button" value="<?php esc_attr_e( 'Advanced configuration', 'autopost-to-mastodon' ); ?>" id="show_advanced_configuration">
+	<?php endif ?>
+	<form method="POST">
+		<?php wp_nonce_field( 'autopostToMastodon-configuration' ); ?>
+		<table class="form-table">
+			<tbody>
+				<tr style="display:<?php echo !ACCOUNT_CONNECTED ? "block":"none"?>">
+					<th scope="row">
+						<label for="instance"><?php esc_html_e( 'Instance', 'autopost-to-mastodon' ); ?></label>
+					</th>
+					<td>
+						<input type="text" id="instance" name="instance" size="80" value="<?php esc_attr_e( $instance ); ?>" list="mInstances">
+					</td>
+					<td>
+						<input class="button button-primary" type="submit" value="<?php esc_attr_e( 'Connect to Mastodon', 'autopost-to-mastodon' ); ?>" name="save" id="save">
+					</td>
+				</tr>
+				<tr style="display:<?php echo ACCOUNT_CONNECTED ? "block" : "none"?>">
+					<th scope="row">
+						<label><?php esc_html_e( 'Status', 'autopost-to-mastodon' ); ?></label>
+					</th>
+					<td>
+						<div class="account">
+						<?php if(ACCOUNT_CONNECTED): ?>
+								<a href="<?php echo $account->url ?>" target="_blank"><img class="m-avatar" src="<?php echo $account->avatar ?>"></a>
+						<?php endif ?>
+							<div class="details">
+								<?php if(ACCOUNT_CONNECTED): ?>
+									<div class="connected"><?php esc_html_e( 'Connected as', 'autopost-to-mastodon' ); ?>&nbsp;<?php echo $account->username ?></div>
+									<a class="link" href="<?php echo $account->url ?>" target="_blank"><?php echo $account->url ?></a>
+
+									<p><a href="<?php echo $_SERVER['REQUEST_URI'] . '&disconnect' ?>" class="button"><?php esc_html_e( 'Disconnect', 'autopost-to-mastodon' ); ?></a>
+									<a href="<?php echo $_SERVER['REQUEST_URI'] . '&testToot' ?>" class="button"><?php esc_html_e( 'Send test toot', 'autopost-to-mastodon' ); ?></a></p>
+								<?php else: ?>
+									<div class="disconnected"><?php esc_html_e( 'Disconnected', 'autopost-to-mastodon' ); ?></div>
+								<?php endif ?>
+							</div>
+							<div class="separator"></div>
+						</div>
+					</td>
+				</tr>
+				<tr class="advanced_setting">
+					<th scope="row">
+						<label for="content_warning"><?php esc_html_e( 'Default Content Warning', 'autopost-to-mastodon' ); ?></label>
+					</th>
+					<td>
+						<input type="text" id="content_warning" name="content_warning" style="width:300px" value="<?php esc_attr_e( $content_warning ); ?>">
+					</td>
+				</tr>
+				<tr style="display:<?php echo ACCOUNT_CONNECTED ? "block" : "none"?>">
+					<th scope="row">
+						<label for="message"><?php esc_html_e( 'Message', 'autopost-to-mastodon' ); ?></label>
+					</th>
+					<td class="advanced_setting">
+						<textarea  rows="10" cols="80" name="message" id="message"><?php esc_html_e( stripslashes( $message ) ); ?></textarea>
+						<p class="description"><i><?php esc_html_e( 'You can use these metas in the message', 'autopost-to-mastodon' ); ?></i>
+							: [title], [excerpt], [permalink] <?php esc_html_e( 'and', 'autopost-to-mastodon' ); ?> [tags]</p>
+					</td>
+					<td class="not_advanced_setting messageRadioButtons">
+							<label>
+                                <b>title</b><br>
+                                <a href="">permalink</a><br><br><br>
+
+                                <input type="radio" name="message_template" value="[title]&#10;&#10;[permalink]">
+                            </label>
+							<label>
+                                <b>title</b><br>
+                                <a href="">permalink</a><br>#tags<br><br>
+                                <input type="radio" name="message_template" value="[title]&#10;&#10;[permalink]&#10;&#10;[tags]">
+                            </label>
+							<label>
+                                <b>title</b><br>
+                                <i>Here comes the excerpt...</i><br><a href="">permalink</a><br>
+                                #tags<br>
+                                <input type="radio" name="message_template" value="[title]&#10;&#10;[excerpt]&#10;&#10;[permalink]&#10;&#10;[tags]">
+                            </label>
+					</td>
+				</tr>
+				<tr style="display:<?php echo ACCOUNT_CONNECTED ? "block" : "none"?>">
+					<th scope="row">
+						<label for="mode"><?php esc_html_e( 'Toot mode', 'autopost-to-mastodon' ); ?></label>
+					</th>
+					<td class="scopeRadioButtons">
+							<label><input type="radio" name="mode" <?php if ( 'public' === $mode ): ?>checked<?php endif; ?> value="public"><img src="<?php echo plugins_url( 'img/post/public.svg', __FILE__ );?>" class="modeIcon"> <?php esc_html_e( 'Public', 'autopost-to-mastodon' ); ?></label>
+							<label><input type="radio" name="mode" <?php if ( 'unlisted' === $mode ): ?>checked<?php endif; ?> value="unlisted"><img src="<?php echo plugins_url( 'img/post/unlisted.svg', __FILE__ );?>" class="modeIcon"> <?php esc_html_e( 'Unlisted', 'autopost-to-mastodon' ); ?></label>
+							<label><input type="radio" name="mode" <?php if ( 'private' === $mode ): ?>checked<?php endif; ?> value="private"><img src="<?php echo plugins_url( 'img/post/private.svg', __FILE__ );?>" class="modeIcon"> <?php esc_html_e( 'Private', 'autopost-to-mastodon' ); ?></label>
+							<label><input type="radio" name="mode" <?php if ( 'direct' === $mode ): ?>checked<?php endif; ?> value="direct"><img src="<?php echo plugins_url( 'img/post/direct.svg', __FILE__ );?>" class="modeIcon"> <?php esc_html_e( 'Direct', 'autopost-to-mastodon' ); ?></label>
+					</td>
+				</tr>
+				<tr class="advanced_setting">
+					<th scope="row">
+						<label for="size"><?php esc_html_e( 'Toot size', 'autopost-to-mastodon' ); ?></label>
+					</th>
+					<td>
+						<input name="size" id="size" type="number" min="100" max="500" value="<?php esc_attr_e( $toot_size ); ?>"> <?php esc_html_e( 'characters', 'autopost-to-mastodon' ); ?>
+					</td>
+				</tr>
+
+				<tr style="display:<?php echo ACCOUNT_CONNECTED ? "block" : "none"?>">
+					<th scope="row">
+						<label for="autopost_standard"><?php esc_html_e( 'Autopost new posts', 'autopost-to-mastodon' ); ?></label>
+					</th>
+					<td>
+						<input type="checkbox" id="autopost_standard" name="autopost_standard" value="on"  <?php echo ( $autopost  == 'on')?'checked':''; ?>>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+
+		<?php if(ACCOUNT_CONNECTED): ?>
+			<input class="button button-primary" type="submit" value="<?php esc_attr_e( 'Save configuration', 'autopost-to-mastodon' ); ?>" name="save" id="save">
+		<?php endif ?>
+
+	</form>
+
+<?php
+	require("instanceList.php")
+?>
+</div>
diff --git a/wp-content/plugins/autopost-to-mastodon/img/donate.svg b/wp-content/plugins/autopost-to-mastodon/img/donate.svg
new file mode 100644
index 0000000000000000000000000000000000000000..1ca05be2a49460a3306bd68e30c864e12b5d7fd5
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/img/donate.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="83" height="30"><rect id="back" fill="#f6c915" x="1" y=".5" width="82" height="29" rx="4"/><svg viewBox="0 0 80 80" height="16" width="16" x="7" y="7"><g transform="translate(-78.37-208.06)" fill="#1a171b"><path d="m104.28 271.1c-3.571 0-6.373-.466-8.41-1.396-2.037-.93-3.495-2.199-4.375-3.809-.88-1.609-1.308-3.457-1.282-5.544.025-2.086.313-4.311.868-6.675l9.579-40.05 11.69-1.81-10.484 43.44c-.202.905-.314 1.735-.339 2.489-.026.754.113 1.421.415 1.999.302.579.817 1.044 1.546 1.395.729.353 1.747.579 3.055.679l-2.263 9.278"/><path d="m146.52 246.14c0 3.671-.604 7.03-1.811 10.07-1.207 3.043-2.879 5.669-5.01 7.881-2.138 2.213-4.702 3.935-7.693 5.167-2.992 1.231-6.248 1.848-9.767 1.848-1.71 0-3.42-.151-5.129-.453l-3.394 13.651h-11.162l12.52-52.19c2.01-.603 4.311-1.143 6.901-1.622 2.589-.477 5.393-.716 8.41-.716 2.815 0 5.242.428 7.278 1.282 2.037.855 3.708 2.024 5.02 3.507 1.307 1.484 2.274 3.219 2.904 5.205.627 1.987.942 4.11.942 6.373m-27.378 15.461c.854.202 1.91.302 3.167.302 1.961 0 3.746-.364 5.355-1.094 1.609-.728 2.979-1.747 4.111-3.055 1.131-1.307 2.01-2.877 2.64-4.714.628-1.835.943-3.858.943-6.071 0-2.161-.479-3.998-1.433-5.506-.956-1.508-2.615-2.263-4.978-2.263-1.61 0-3.118.151-4.525.453l-5.28 21.948"/></g></svg><text fill="#1a171b" text-anchor="middle" font-family="Helvetica Neue,Helvetica,Arial,sans-serif" font-weight="700" font-size="14" x="50" y="20">Donate</text></svg>
\ No newline at end of file
diff --git a/wp-content/plugins/autopost-to-mastodon/img/post/direct.svg b/wp-content/plugins/autopost-to-mastodon/img/post/direct.svg
new file mode 100644
index 0000000000000000000000000000000000000000..71a1c2e4efd248ef5f08e239e9d65e445d11e220
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/img/post/direct.svg
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 14 14" style="enable-background:new 0 0 14 14;" xml:space="preserve">
+<g>
+	<g>
+		<path style="fill:#030104;" d="M7,9L5.268,7.484l-4.952,4.245C0.496,11.896,0.739,12,1.007,12h11.986
+			c0.267,0,0.509-0.104,0.688-0.271L8.732,7.484L7,9z"/>
+		<path style="fill:#030104;" d="M13.684,2.271C13.504,2.103,13.262,2,12.993,2H1.007C0.74,2,0.498,2.104,0.318,2.273L7,8
+			L13.684,2.271z"/>
+		<polygon style="fill:#030104;" points="0,2.878 0,11.186 4.833,7.079 		"/>
+		<polygon style="fill:#030104;" points="9.167,7.079 14,11.186 14,2.875 		"/>
+	</g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>
diff --git a/wp-content/plugins/autopost-to-mastodon/img/post/private.svg b/wp-content/plugins/autopost-to-mastodon/img/post/private.svg
new file mode 100644
index 0000000000000000000000000000000000000000..814d1ffb1fa4c162aa22093afd32ffbbac4b4f18
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/img/post/private.svg
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="401.998px" height="401.998px" viewBox="0 0 401.998 401.998" style="enable-background:new 0 0 401.998 401.998;"
+	 xml:space="preserve">
+<g>
+	<path d="M357.45,190.721c-5.331-5.33-11.8-7.993-19.417-7.993h-9.131v-54.821c0-35.022-12.559-65.093-37.685-90.218
+		C266.093,12.563,236.025,0,200.998,0c-35.026,0-65.1,12.563-90.222,37.688C85.65,62.814,73.091,92.884,73.091,127.907v54.821
+		h-9.135c-7.611,0-14.084,2.663-19.414,7.993c-5.33,5.326-7.994,11.799-7.994,19.417V374.59c0,7.611,2.665,14.086,7.994,19.417
+		c5.33,5.325,11.803,7.991,19.414,7.991H338.04c7.617,0,14.085-2.663,19.417-7.991c5.325-5.331,7.994-11.806,7.994-19.417V210.135
+		C365.455,202.523,362.782,196.051,357.45,190.721z M274.087,182.728H127.909v-54.821c0-20.175,7.139-37.402,21.414-51.675
+		c14.277-14.275,31.501-21.411,51.678-21.411c20.179,0,37.399,7.135,51.677,21.411c14.271,14.272,21.409,31.5,21.409,51.675V182.728
+		z"/>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>
diff --git a/wp-content/plugins/autopost-to-mastodon/img/post/public.svg b/wp-content/plugins/autopost-to-mastodon/img/post/public.svg
new file mode 100644
index 0000000000000000000000000000000000000000..50296c60207754057c6564270e448c0d2cb5470e
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/img/post/public.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="31.416px" height="31.416px" viewBox="0 0 31.416 31.416" style="enable-background:new 0 0 31.416 31.416;"
+	 xml:space="preserve">
+<g>
+	<g>
+		<path d="M28.755,6.968l-0.47,0.149L25.782,7.34l-0.707,1.129l-0.513-0.163L22.57,6.51l-0.289-0.934L21.894,4.58l-1.252-1.123
+			l-1.477-0.289l-0.034,0.676l1.447,1.412l0.708,0.834L20.49,6.506l-0.648-0.191L18.871,5.91l0.033-0.783l-1.274-0.524l-0.423,1.841
+			l-1.284,0.291l0.127,1.027l1.673,0.322l0.289-1.641l1.381,0.204l0.642,0.376h1.03l0.705,1.412l1.869,1.896l-0.137,0.737
+			l-1.507-0.192l-2.604,1.315l-1.875,2.249l-0.244,0.996h-0.673l-1.254-0.578l-1.218,0.578l0.303,1.285l0.53-0.611l0.932-0.029
+			l-0.065,1.154l0.772,0.226l0.771,0.866l1.259-0.354l1.438,0.227l1.67,0.449l0.834,0.098l1.414,1.605l2.729,1.605l-1.765,3.372
+			l-1.863,0.866l-0.707,1.927l-2.696,1.8l-0.287,1.038c6.892-1.66,12.019-7.851,12.019-15.253
+			C31.413,12.474,30.433,9.465,28.755,6.968z"/>
+		<path d="M17.515,23.917l-1.144-2.121l1.05-2.188l-1.05-0.314l-1.179-1.184l-2.612-0.586l-0.867-1.814v1.077h-0.382l-2.251-3.052
+			v-2.507L7.43,8.545L4.81,9.012H3.045L2.157,8.43L3.29,7.532L2.16,7.793c-1.362,2.326-2.156,5.025-2.156,7.916
+			c0,8.673,7.031,15.707,15.705,15.707c0.668,0,1.323-0.059,1.971-0.137l-0.164-1.903c0,0,0.721-2.826,0.721-2.922
+			C18.236,26.357,17.515,23.917,17.515,23.917z"/>
+		<path d="M5.84,5.065l2.79-0.389l1.286-0.705l1.447,0.417l2.312-0.128l0.792-1.245l1.155,0.19l2.805-0.263L19.2,2.09l1.09-0.728
+			l1.542,0.232l0.562-0.085C20.363,0.553,18.103,0,15.708,0C10.833,0,6.474,2.222,3.596,5.711h0.008L5.84,5.065z M16.372,1.562
+			l1.604-0.883l1.03,0.595l-1.491,1.135l-1.424,0.143l-0.641-0.416L16.372,1.562z M11.621,1.691l0.708,0.295l0.927-0.295
+			l0.505,0.875l-2.14,0.562l-1.029-0.602C10.591,2.526,11.598,1.878,11.621,1.691z"/>
+	</g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>
diff --git a/wp-content/plugins/autopost-to-mastodon/img/post/unlisted.svg b/wp-content/plugins/autopost-to-mastodon/img/post/unlisted.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5d15e37a1ced4e66e917291b1ff684ba29b98536
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/img/post/unlisted.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="438.533px" height="438.533px" viewBox="0 0 438.533 438.533" style="enable-background:new 0 0 438.533 438.533;"
+	 xml:space="preserve">
+<g>
+	<path d="M375.721,227.259c-5.331-5.331-11.8-7.992-19.417-7.992H146.176v-91.36c0-20.179,7.139-37.402,21.415-51.678
+		c14.277-14.273,31.501-21.411,51.678-21.411c20.175,0,37.402,7.137,51.673,21.411c14.277,14.276,21.416,31.5,21.416,51.678
+		c0,4.947,1.807,9.229,5.42,12.845c3.621,3.617,7.905,5.426,12.847,5.426h18.281c4.945,0,9.227-1.809,12.848-5.426
+		c3.606-3.616,5.42-7.898,5.42-12.845c0-35.216-12.515-65.331-37.541-90.362C284.603,12.513,254.48,0,219.269,0
+		c-35.214,0-65.334,12.513-90.366,37.544c-25.028,25.028-37.542,55.146-37.542,90.362v91.36h-9.135
+		c-7.611,0-14.084,2.667-19.414,7.992c-5.33,5.325-7.994,11.8-7.994,19.414v164.452c0,7.617,2.665,14.089,7.994,19.417
+		c5.33,5.325,11.803,7.991,19.414,7.991h274.078c7.617,0,14.092-2.666,19.417-7.991c5.325-5.328,7.994-11.8,7.994-19.417V246.673
+		C383.719,239.059,381.053,232.591,375.721,227.259z"/>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>
diff --git a/wp-content/plugins/autopost-to-mastodon/instanceList.php b/wp-content/plugins/autopost-to-mastodon/instanceList.php
new file mode 100644
index 0000000000000000000000000000000000000000..642fed537a419349636cc53309f191e11eb2ccf5
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/instanceList.php
@@ -0,0 +1,9 @@
+<?php
+$mInstancesArray = ["mastodon.xyz","awoo.space","social.tchncs.de","animalliberation.social","socially.constructed.space","icosahedron.website","hostux.social","social.diskseven.com","social.gestaltzerfall.net","social.imirhil.fr","sdfn-01.ninjawedding.org","aleph.land","masto.themimitoof.fr","social.ballpointcarrot.net","manowar.social","share.elouworld.org","7nw.eu","maly.io","mastodon.gougere.fr","social.alex73630.xyz","social.lkw.tf","social.wxcafe.net","oc.todon.fr","hex.bz","social.apreslanu.it","social.tcit.fr","fern.surgeplay.com","octodon.social","witches.town","pouet.yolops.net","social.nasqueron.org","mastodon.hasameli.com","mastodon.lertsenem.com","mastodon.club","anticapitalist.party","social.atypique.net","rafting.io","social.snargol.com","mastodon.cloud","masto.raildecake.fr","pouet.it","rich.gop","adney.land","mstdn.io","botsin.space","m.sl-network.fr","mastodon.top","toot.cafe","mastodon.partipirate.org","status.dissidence.ovh","social.nervestaple.com","mastodon.tetaneutral.net","social.jdiez.me","social.glados.ch","schuppentier.org","mastodon.rocks","mastodon.technology","mastodon.cc","social.targaryen.house","hitb-masto.herokuapp.com","securitymastod.one","cybre.space","toot.cat","mastodon.opportunis.me","from.komic.eu","techn.ical.ist","unixcorn.xyz","cmpwn.com","niu.moe","bibeogaem.zone","mastodon.roflcopter.fr","mastodon.peshane.net","mastodon.elao.com","im-in.space","social.taker.fr","dancingbanana.party","mstdn.fr","oreka.online","toot-lab.reclaim.technology","occitanie.social","masto.io","tootplanet.space","mastodon.at","slime.global","igouv.fr","mastodon.land","mastodon.dremtech.fr","boitam.eu","ecurie.social","social.troll.academy","mastodon.blue","social.d0p1.eu","social.lasanha.org","meow.social","tiny.tilde.website","tusk.social","tali.t0k.org","mastodon.kujiu.org","social.homunyan.com","social.numerama.com","mastodon.tedomum.net","mastodon.rainbownerds.de","social.etc-services.de","mastodon.patallan.com.au","mamot.fr","mastodon.zaclys.com","mastodon.open.legal","social.imchip.be","mastodon.kawaiyume.net","mastodonfrance.com","mastodon.me.uk","fierce-reef-65367.herokuapp.com","antisocial.narinimous.fr","masto.quad.moe","manx.social","social.infranix.eu","mastadon.tescher.me","mastodon.mpy.ovh","cmu.party","infosec.exchange","mastodon.cgx.me","social.adlerweb.info","fo0bar.org","masto.dog","mastodon.indie.host","mastodon.host","ca-os.com","darksocial.party","bookwitty.social","mastodon.chaosfield.at","toot.gibberfish.org","myriad.social","webcommunity.club","freeradical.zone","tinnies.club","social.depertat.net","kosmos.social","tooting.intensifi.es","mastoton.fi","mastodon.fun","mastodon.hackerlab.fr","social.weho.st","metal.odon.space","anti.energy","mastodon.pe","tescher.me","mamout.xyz","shelter.moe","social.nah.re","oulipo.social","queer.party","a.weirder.earth","brrrt.eu","mastodon.codingfield.com","mastodon.qowala.org","ika.moe","masto.pt","vulpine.club","mst3k.interlinked.me","toot.berlin","mastodon.migennes.net","social.mastodon.com.au","mastodon.not-enough.space","oldbytes.space","social.svallee.fr","freehold.earth","toot.aquilenet.fr","masto.svnet.fr","mastodon.zombocloud.com","mastodon.weaponvsac.space","scifi.fyi","capitalism.party","myfreckle.com","mastodon.sandwich.net","mastodon.thegraveyard.org","nodotsam.xyz","status.pointless.one","eunivers.social","soc.ialis.me","loutre.info","pouet.meutel.net","mastodon.cemea.org","diaspodon.fr","masto.fdlibre.eu","functional.cafe","mastodon.pirateparty.be","mastodon.hk","ostatus.renken.is","bapp.me","party.personal.pizza","bne.social","social.noostache.fr","m.g3l.org","social.devloprog.org","pouets.ovh","miaou.drycat.fr","mastodon.org.uk","tooot.im","geeks.one","social.nassi.me","apoil.org","mastodon.ar.al","noagendasocial.com","cafe.des-blogueurs.org","social.csswg.org","atomicfridge.net","mastodon.cusae.com","glitch.social","mastodon.co.nz","mastodon.jamesmwright.com","simstim.club","masto.ninja","mastodon.transneptune.net","framapiaf.org","mastodon.lu","spanner.works","mstdn.nl","resistodon.com","bloodandthunderleviathan.herokuapp.com","mastodon.acc.umu.se","mastodon.triofan.com","sys.kawi.fr","trunk.mad-scientist.club","nsfw.finance","teamtk.eu","mastodon.yoyo.org","mstdn.maud.io","wogan.im","mastodon.scuttle.org","betterletter.io","pdx.social","friloux.me","un.lobi.to","h.kher.nl","yso.pet","social.sitedethib.com","mammouth.cafe","pachyder.me","mastodon.eliotberriot.com","social.devio.us","mastodon.hugopoi.net","s.maximeborg.es","toot.tzim.net","mastodon.le-palantir.com","mastodon.unfollow.today","x0r.be","mastodon.yokohama","mastodon.lachman.tk","mastodon.9net.org","m.gandi.social","chabant.social","mammut.space","scotland.computer","snabeltann.no","chitter.xyz","cn.tootist.net","mstdn.jp","mastodon.papey.fr","mastodon.technosorcery.net","toot.lmorchard.com","social.rbs.io","mastodon.nzoss.nz","social.logilab.org","mastodon.scot","mastodon.juggler.jp","pouet.panglossoft.fr","mastodon.groningendigitalcity.com","bonn.social","toot.love","sns.gdgd.jp.net","toot.memtech.website","computerfairi.es","kirakiratter.com","nrd.li","mastodon.un-zero-un.net","mstdn.club","m6n.jp","wellness.so","mstdn.social","kyoto-citygrid.org","mastodon.jtwp470.net","toot.yukimochi.jp","mastodon.sakaki333.com","g0v.social","myles.life","chaos.social","corrigan.moe","mstdn.poyo.me","mastodon.u4u.org","mastodonti.co","mastodon.zeguigui.com","tablegame.mstdn.cloud","lovelive-anime.tk","mstdn.barippi.com","oransns.com","dolphin.town","mstdn.blue","socialgame.mstdn.cloud","hojiro.herokuapp.com","mastodon.eastback.co.jp","m6n.onsen.tech","m.sighash.info","comm.cx","delusion.ariela.jp","pawoo.net","mstdn.cc","pao.moe","mstdn-workers.com","mastodon.2502.net","mstdn.kemono-friends.info","reseau.education","mstdn.neigepluie.net","mstdn.otofu.xyz","www.mstddntfdn.online","interfesse.net","mstdn.cf","ekimemo.info","mstdn.taiha.net","yoshis.woolly.world","social.katarpilar.com","mastodon.motcha.tech","otoya.space","inari.opencocon.org","md.ggtea.org","m4570.xyz","cksv.jp","frootmig.net","mastodon.minicube.net","tenforward.social","pleasehug.me","wsup.social","don.tacostea.net","mstdn.syui.cf","niwatoriman.me","mastodon.art","mstdn.mobilehackerz.jp","mustardon.tokyo","mstdn.omaera.org","mastodon.maromaro.co.jp","mstdn.onosendai.jp","faux.io","mastodon.sylphid.jp","gbtdn.tokyo","kero.ccsakura.jp","mast.moe","social.java.nrw","social.myconan.net","such.social","mstdn.misosi.ru","mastd.me","mstdn.firstforest.jp","mstdn.anontown.com","mastodon-omoshiro.com","mstdn.neriko.net","mastodon.huma-num.fr","imastodon.net","m.u7fa9.org","mast.tokyo","mastodon.zenfolie.org","mastodon.dereferenced.org","now.kibousoft.co.jp","mstdn.yuyat.jp","ephemeral.glitch.social","toot.kashishokunin.com","mstdn.hokkaido.jp","mstdn.uec.tokyo","7144.party","don.wakamesoba98.net","minidon.bacardi55.org","mstdn.nametaketakewo.net","gamecreate.mstdn.cloud","m.rweekly.org","mastodon.chotto.moe","mstdn.techdrive.top","mastodon.toycode.com","mastodon.centiworks.com","mastodon.titoux.info","mastodon.lithium03.info","vmrpc.net","mst.ongstar.jp","mdn.hinaloe.net","mstdn.gaijinsize.com","mastodon.hekki.info","yontengop.com","mstdn.nakayuki.net","mastodon.hakoai.com","toot.oekaki.st","bitcoinadon.social","dq10.online","social.nofftopia.com","m.v.nu","mstdn.noritsuna.jp","kerokero.rororo.xyz","mastodon.zunda.ninja","z-socialgame.mstdn.cloud","4com.jp","vocalodon.net","gensokyo.cloud","ika.queloud.net","don.chakuriki.net","mastdn.lovesaemi.daemon.asia","i.write.codethat.sucks","spooky.pizza","ecodigital.social","jp-mstdn.com","mastodon.iot.tokyo","mstdn.soysoftware.net","chitose.moe","kinky.business","mstdn.nemsia.org","xn--zck4ad5f2e.jp","mellified.men","toot.redmine.jp","mastodon.yuritopia.net","castodon.jp","mstdn.cafe","ostatus.isidai.com","waraiotoko.net","mstdn.masuei.net","mstdn.sanin.club","mstdn-jp.site","social.qunagi.net","mstdn.9uelle.jp","mastodon.burnworks.com","vkdn.jp","mstdn.osaka","kemonodon.club","mastodoom.social","toot.pm","m.loovto.net","social.irrwitz.com","mstdn.ht164.jp","insoumis.social","wandering.shop","don.mfz.jp","pritter.tk","ifrit.gaia.ff14-mstdn.xyz","tokyo.mastodon-servers.net","horiedon.com","mstdn.yjsnpi.nu","vastodon.com","mstdn.nanamachi.net","takahashi.social","mastodon.undernet.uy","mstdn.tinko.club","otajodon.com","mstdn-d.info","mstdn.madpainter.info","manhole.club","sn.angry.im","mastodont.cat","otogamer.me","moe.neon.moe","japaon.cf","mstdn.syoriken.org","gigamastodon.com","domdom.tokyo","yudetarou.club","aidon.club","m.massy.city","pouet.couchet.org","mstdn.mechkey.jp","catdon.life","mstdn.ernix.jp","mstdn.awa.sfc.keio.ac.jp","unnerv.jp","is.a.qute.dog","mastodon.29lab.jp","mstdn.serv-ops.com","mstdn.ropo.jp","mastodon.robotstart.info","mastodon.p2pquake.net","gunmastodon.com","twingyeo.kr","mastodon.crazynewworld.net","mastodon-srv.gq","eletusk.club","mstdn.nere9.help","mastodon.etalab.gouv.fr","yukari.cloud","mastodon.machique.st","ery.kr","don.techfeed.io","avidol.jp","oriwebdon.com","friends.nico","mastodon.gifclip.info","mdn.crows.tokyo","social.spiwit.net","djanzu.tokyo","toot.tibidoo.com","mstdn.fm","mstdn.togawa.cs.waseda.ac.jp","mastodon.to","tusk.schoollibraries.net","fgochiho.vip","m.okadajp.org","mstdn.awm.jp","mstdn.guru","mastd.racing","mastodon.ka0.co","mastodon.m0t0k1ch1.com","elephant.bike","mstdn.okumin.com","gadget.inpocket.net","ro-mastodon.puyo.jp","mstdn.golf","omanko.porn","tuner.1242.com","funfunmstdn.tokyo","mastodon.poker","mstdn.creatorsnight.com","don.msng.info","social.celabs.com","3.nu","mstdn.kaonikki.tokyo","mastodon.mnetwork.co.kr","iamastodon.gifu.jp","vapers.jp","mastodon.ingress-enl.jp","social.dropbear.xyz","mstdn.glorificatio.org","noupti.me","mastodon.niu.ne.jp","social.oupsman.fr","aqua-graphic.blue","mastodol.jp","mastodon.crazypanda.fr","mstdn-football.jp","mstdn-kanazawa.jp","mstdn.voyage","ranobe.net","mimumedon.com","mastodon.nara.jp","mikumikudance.cloud","mastodons.jp","md.yutasan.co","mastdon.amazedkoumei.com","mist.so","madomadon.net","mstdn.klg-tree.jp","mastodon.sngsk.info","photodn.net","haruhi-mstdn.club","pouet.chouech.org","dtp-mstdn.jp","md.jigensha.info","mangadon.net","mathtodon.com","pouet.dachary.org","mastodoll.net","mastodon.cosmicanimal.jp","society.oftrolls.com","mi.pede.rs","fanfare.horse","mastodon.expert","bookn.me","mastodon.crossfamilyweb.com","taruntarun.net","im.notreal.pw","happy-social-life.fudanchii.net","mstdn.hyogo.jp","social.alifein.tech","siege.rhino.cards","mstdn.mx","tetsugaku.place","mstdn.niigata.jp","technologeek.me","mn.kitetu.com","linuxrocks.online","mevo.xyz","august-don.site","mstdn.fy.to","mastodon.oita.jp","t.d65.xyz","ofuton.io","don.ekesete.net","social.kimamass.com","mastodon.lavergne.online","mrt.al","anime.mstdn.cloud","mstdn.fukuoka.jp","ffxiv-mastodon.com","ekuro.jp","mastodon.muage.org","mastodon.snowandtweet.jp","sldon.jp","engineered.space","hamtter.net","elict.net","jojomonvr.com","babuu.club","mi5.jp","mstdn.studio","mastodon.mfjt.jp","mastodon.linuxquimper.org","himastdon.club","open2.ch","cigarcabin.com","biwakodon.com","masatodon.click","kirby-fans.com","kabutodon.com","mastodon.sdf.org","jstd.me","saigodon.jp","sunshinegardens.org","mastodon.lemarchand.io","tutut.delire.party","charafre.noela.moe","syachiku.net","m.uncate.org","mammut.zasha.style","nishinomiya.in.net","summoners-riftodon.jp","mstdn-ac.ryukyu","mathtod.online","wizfox.jp","mental.social","chofudon.tokyo","yomidon.okinawa","shadowverse-mstdn.jp","eizodon.jp","teo.taiha.net","social.hyuki.net","social.matsuuratomoya.com","mastodon.850mb.net","mstdn.toaruhetare.net","fx-don.net","jeunesse.media","don.rabbit-house.me","babymetal.party","veah.cocoa.moe","mstdn.goziline.com","keiba.social","mstdn.gots9713.xyz","baraag.net","tusk.what.re","mofu.kemo.no","chibi.kemo.no","ediot.social","xn--wmq.jp","wowsdon.xyz","mstdn.superspeed-fall.com","www.nekotodon.com","eigadon.net","mstdn.i-red.info","niigata.minnna.xyz","recode.macro.tokyo","mastodon.training","mastodon.sail42.fr","clacks.link","s.ovalerio.net","under-bank.blue","mstdn.dasoran.net","kirapower.ichigo-hoshimiya.com","tekkadon.manimani.cc","mastodon.uy","mastodon.fyi","mstdn.it-infra.jp","mstdn.yantene.net","mstdn.debate.info-labs.jp","mstdn.monster-girl.homelinux.net","mstdn.hanabi-life.net","pso2.club","precure.ml","mstdn.idolhack.com","yakyudon.net","mastodon.bitbank.cc","mstdn-vn.com","shigadon.com","mstdn.nagasaki.jp","don.akashi.cloud","mastodon.oss.nagoya","matchdon.com","konkat.jp","leaf.style","mastodon.noraworld.jp","animefun.jp","39sounds.net","urawareds.org","friends.tennis","sakaba.space","mastodon.osaka","www.mofgao.space","mstdn.lalafell.org","pachi.house","kmmtn.com","forexdon.org","mastodon.nl","go-newbie.club","home.aqraf.tokyo","jitakudon.com","flower.afn.social","kakudon.com","mstdn.ipz.jp","lgbt.io","masatodon.jp","mastodon.aquarla.net","mstdn.trashkids.org","noisebridge.social","mstdn.kwmr.me","mastodonchile.club","social.coop","dhtls.net","social.paco.to","mstdn-minpaku.jp","dartsdon.jp","umastodon.jp","emojidon.global","social.konosuke.jp","mastodon.macsnet.cz","scholar.social","tvdon.rt-trend.jp","mstdn-bike.net","kurage.cc","ostatus.yajamon.xyz","fudanshi.org","shkval.net","mastodon.mit.edu","mathstodon.xyz","social.vincentux.fr","mastodon.on-o.com","ostatus.shade3d.jp","donsuke.biz","mammout.bzh","mikado-city.jp","catdon.jp","tsuruga.net","dramadon.net","o.kagucho.net","everydon.com","livers.jp","mediartodon.net","mastodon.medieval.jp","ostatus.taiyolab.com","status.bcarlin.net","social.tinysubversions.com","utodon.jp","toot.forumanalogue.fr","toot.matereal.eu","mstdn.lyker.jp","mayodon.club","xmstdn.com","carma.red","nomlishdon.racing-lagoon.info","mastodon.izzz.fr","risingsun.red","mastodon.gargantia.fr","fr.osm.social","social.touha.me","mastodon.social","trickle.ink","mstdn2017.club","kitty.town","urvogel.club","mstdngirls.net","pouet.apdu.fr","mastodon.swordlogic.com","nagayodon.com","mastodon-lyontech.fr","mstdn.okinawa.jp","naos.crypto.church","mastodon.3bk.jp","mel.social","mastodos.com","cosp.la","warubure.online","masatodon.com","mstdn.ytgrsua4.net","ashikaga.link","training-fitness.fun","lilydon.com","todon.nl","ngndn.jp","mastodon.randulo.com","mr.am","mastodon.fu-jp.net","introvert.party","mstdn.hisurga.com","mastodon.matrix.org","elekk.xyz","toot.psyco.fr","lomo.mstdn.tokyo","xn--zckuao5dze.jp","podcast.style","forum.manga.tokyo","hydroxyquinol.net","hige.alterna-cloud.com","killmi.st","mastodon.shuuten.org","voe.social","mastodon.teamblackberry.jp","mstdn.sanin.link","mastodon.plein.org","mastodon.fishing","mstdn-babymetal.com","mstdn-uragi.jp","kancolle-yokosuka.xyz","spod.ca","mstdn.tako774.net","mstdn.b-shock.org","mstdn.a-tak.com","hfukuchi.masto.host","mstdn.zuyadon.tk","mastodon.iut-larochelle.fr","mstdn.chordwiki.org","mastodon.internot.no","kurakake.net","gundam.masto.host","nice.toote.rs","cuttlefi.sh","cookdon.com","ue4-mstdn.tokyo","mastodon.partecipa.digital","mstdn.onl","toot.blue","shimaidon.net","mastodon.aventer.biz","don.h3z.jp","gamelinks007.net","mstdn.felice.biz","mstdn.felice.biz.","ostatus.blessedgeeks.org","jpnews.site","social.ponyfrance.net","sandbox.skoji.jp","saitama-stdn.com","equestria.social","mastodon.neilcastelino.com","www.ksu-mastodon.com","social.over-world.org","labotadon.net","mastodon.kebree.fr","selfy.army","unityjp-mastodon.tokyo","scalie.club","kaisendon.asmodeus.red","mastodon.nestegg.net","mstdn.wildtree.jp","natudon-outdoor.net","toot.ordinarius-fectum.net","foodon.jp","basstdn.jp","ieji.de","writing.exchange","sanam.xyz","subculdon.com","monstodon.info","pochi46.com","clodostr.at","mstdn.yoshimov.com","mastodon.infra.de","john-mastodon.scalingo.io","mastodon.latransition.org","mstdn.tokyocameraclub.com","insolente.im","janogdon.net","musicdn.jp","redwombat.social","rugdon.fun","banthamilk.blue","mstdn.okayama.jp","solo-outdon.club","ostatus.blessedgeeks.jp","s.brined.fish","mstdoujin.net","emacs.li","compass-community.f5.si","uldhaar.dk","mastodon.potager.org","social.noff.co","765ml.com","botdon.net","mastodon.lignux.com","gingadon.com","danshudon.jp","mstdn.kyoto","mastodon.home.js4.in","lfsr.net","nicra.fr","glamdon.com","moeism.me","mastodon.dissem.ch","chiawase.tokyo","social.alabasta.net","mastodon.wakayama.jp","mastodon.acc.sunet.se","natudon-fishing.net","don.matchy.jp","mstdn18.jp","tgp.jp","mediadon.jp","doll.social","mostodon.info","mstdn.taiyaki.online","queer.town","mastedm.club","miestodon.com","social.pueseso.club","md.paoon.social","moseisley.club","east.mstdn.tokyo","mastodon.diglateam3.com","hckr.no","ukrainian.social","mastodon.scoffoni.net","durel.org","social.bluecore.net","aigisdon.net","moe.cat","mstdn.kanagu.info","sldon.com","mstdn.fujii-yuji.net","mastodon.moshsh-mate.com","party.ochakai.moe","social.arbleizez.bzh","nandon.cc","social.lafermenumerique.com","mstdn.kwmr.info","m.moriya.faith","m.pira.jp","cocoronavi.net","mastodon.e217.net","mstdnsrv.moe.hm","mstdn.bizocean.co.jp","mastodon.redbrick.dcu.ie","nfg.zone","the.wired.sehol.se","sakoku.jp","mastodon.jpages.eu","coales.co","kemono-friends.masto.host","social.conglomer.net","matitodon.com","acg.mn","thinkers.ac","mastodon.ftfl.ca","gonsphere.tk","qiitadon.com","tvdon.tv","lou.lt","mstdn.aquaplus.jp","obitsudon.midyuki.net","mastodon.beerfactory.org","tegedon.net","aruk.as","mast.eu.org","mstdn.ibaraki.jp","plasticmodels.tokyo","mastodon.gza.jp","yamastodon.jp","kabudon.jp","m6n.kigurumi.fun","imaginair.es","quizdon.com","575don.club","mast.kaikretschmann.de","nagoyadon.jp","googoldon.net","mstdn.imoimo.xyz","chibadon.jp","social.pretzlaff.co","mstdn.mini4wd-engineer.com","gamba.osaka.jp","christodon.com","gamejam.site","angel.innolan.net","m.geraffel.net","mastodonargentina.club","mstd.tokyo","chorus.space","mastodon.mrtino.eu","social.backtick.town","mastodon.dotopia.dk","mstdn.mochiwasa.xyz","techdon.info","mastodon.kitamurakz.com","rikadon.club","social.48bin.net","social.strog.org","mastodon.matcha-soft.com","mastodon.osyakasyama.me","mdx.ggtea.org","t.con.sh","nobody.social","w3c.social","kurosawa-ruby.xyz","blackice.online","toot.plus.yt","theferret.social","learn-english.site","deep-learning.site","mammouth.inframed.net","mastodon.evolix.org","bcn-users.degica.com","real-escape.jp","elephant.bluecore.net","hodl.city","malfunctioning.technology","music.pawoo.net","ipv6.social.konosuke.jp","gonext.gg","mastodonte.me","orlando.community","yukarin.club","persadon.com","mastodon.starrevolution.org","claristdon.net","gdrsocial.it","m.socialjustice.engineering","mstdn.asami.red","mastodon.horde.net.br","rubber.social","ziroh.be","raccoon.network","photog.social","nerds.party","social.chinwag.im","wasteland.pro","mstdn.dyndns.org","hokutodon.co","anitwitter.moe","gelt.cz","kashiwadon.net","julika.jp","animedon.tk","kaisendon.masto.host","social.chilliet.eu","borderline.mooo.info","sdmesh.social","fur.cloud","social.wiuwiu.de","metalhead.club","this.mouse.rocks","catgram.jp","kawasaki-city.social","mastodon.capitaines.fr","foresdon.jp","monsterpit.net","kirishimalab21.xyz","social.arnip.org","bookwor.ms","succ.faith","msdn.yourrhythm.jp","anarchism.space","iwatedon.net","kiminona.co","mastodon.com.pl","ika.julika.jp","cybr.es","mstdn.miyazaki.jp","edge.mstdn.jp","guimik.fr","wug.fun","mstdn.lalafell.org.","mstdn.phonolo.gy","haupt.bahnhof.cz","mastodonian.city","spladoon.yuzulia.com","toot.ordinarius-fectum.net.","iyher.club","touhey.org","esperanto.masto.host","social.mecanis.me","mstdn.cygnan.com","jubi.life","social.mochi.academy","mastodon.therianthro.pe","phirat.club","toot.si","instance.business","acid.wtf","idolish7.fun","ykzts.technology","lordinateur.tech","social.fractalco.re","pleroma.soykaf.com","manhater.io","epsilon.social","mangadon.info","nantes.social","reallygay.party","mastodon.kosebamse.com","fosstodon.org","togart.de","social.treyssatvincent.fr","cosi.town","mstdn.lesamarien.fr","cervidae.space","chirpi.de","kokokokko.com","social.sakamoto.gq","hearthtodon.com","asonix.dog","jesusinthe.club","handon.club","ichiji.social","cmx.im","pokemon.mastportal.info","mastodon.productionservers.net","intersect.hackershack.net","legfr.social","ilove.mochi.academy","masto.donte.com.br","t.b612.me","chiji.space","overthinking.club","social.talk.coffee","nulled.red","tootcn.com","esp.community","puter.games","mast.tayori.org","mstdn.ryanak.xyz","mstdn.thenetherlands.jp","swift.language.jp","knzk.me","birdsite.link","md.cryo.jp","social.ntic.fr","qdon.space","playvicious.social","moose.land","drg.im","voluntary.world","creative.rabbinicorn.com","ipno.us","mstdn.se","syui.ml","tomitodon.huideyeren.info","mattips.online","mastodon.floripa.br","assortedflotsam.com","toot.cerebralab.com","hitlers.win","mess.casa","soscet.network","bangdream.space","m.hxbus.net","ltch.fr","occult.camp","wkfg.me","mao.daizhige.org","trans.town","toot.chat","mastodon.yamaken.jp","sigint.sx","mastodon.kamunagara.org","mastodon.hong.io","uri.life","iscute.ovh","haxors.com","mastodon.mail.at","mastodon.baeck.at","mastodonserver.se","mstdn.ephemeral-arcadia.jp","social.sdr.haus","rumia.xyz","canislupus.im","toot.okaris.de","dragon.style","feralkin.com","muenster.im","www.chatalk.club","chikuwa.sweak.net","dutchxs.com","mstdn.zoddo.fr","m.paulbutler.org","mammut.buzz","mn.ms","rthelp.rta.vn","android-user.club","mastodon.rta.vn","mstdn.m4sk.in","nokotaro.com","social.netzkombinat.su","gldon.hostdon.jp","mastodon.funigtor.fr","m.devolio.net","scicomm.xyz","md.xps2.net","ali.delbertbeta.cc","robloxcommunity.social","chaosphere.hostdon.jp","gamers.social","bigdoinks.online","mastodon.gamedev.place","squid.cafe","stoneartprod.xyz","unique-inet.tokyo","tech.lgbt","pnw.social","planet.moe","hispagatos.space","hodl.social","cofe.social","social.lab.cultura.gov.br","wxw.moe","mastodon.lolisandstuff.moe","mastodon.sergal.org","libertarian.chat","not.phrack.fyi","sozial.derguhl.de","cutie.space","ancr.club","newtype.institute","0.unicomplex.co","mast.datamol.org","cuddleso.me","kirishima.cloud","mastodon.sk","kalebporter.club","empathytech.net","gouhuoapp.com","chablis.social","zerohack.xyz","m.bonzoesc.net","social.buffalomesh.net","mastodon.garbage-juice.com","wales2600.com","social.cofe.space","weebs.moe","social.koyu.space","mstdn-nct.com","mastodon.microdata.co.uk","toot.kif.rocks","campaign.openworlds.info","fivewords.uk","mastodon.schlenz.ruhr","mastodon.waffle.tech","mstdn.kigurumi.fun","ma.luna.fyi","mstdn.xn--q9jyb4c","furry.wtf","sckc.stream","social.tuto-craft.com","schlechter.host","social.chinwag.org","cb.ku.cx","high.cat","queer.cloud","ruhr.social","the.resize.club","social.tilde.team","hackers.social","toot.timecube.club","mstdn.xn--h1ahnbk7d.xn--p1ai","salty.vet","yuzulia.xyz","fla.red","mastodon.retrodigital.net","tootme.de","social.that.world","zenet.work","frell.co","m.moe.cat","mastodon.radiofreerobotron.net","masto.cryptoworld.is","bsd.network","gazette.live","republikrenyonez.sytes.net","mamut.social","eldritchworld.nom.es","mastdc.com","gamemaking.social","theboss.tech","mastodonten.de","m.hitorino.moe","el-ktm.com","mastodon.daiko.fr","mastodon.desord.re","bam.yt","toot.iwh12.jp","steamstdn.com","tobane.m.to","innocent.yukimochi.io","doronko.club","3dscapture.net","mastodon.immae.eu","retro.social","hikarin.m.to","p.kokolor.es","don.mamemo.online","social.eyesight.jp","mst.idsdt.com","john.town","pleroma.knzk.me","poils.pachyderme.net","fox.masto.host","fsdon.com","mstdn.monappy.jp","pcgame.jp","beer.m.to","v22017122292958322.goodsrv.de","mir.hostdon.jp","kamiyacho.net","darkest-timeline.com","dev.glitch.social","oxidized.systems","pom.masto.host","pouet.chapril.org","rainyman.jp","nightmare.zone","muwiter.m.to","dnfc.fun","mstdn.haru2036.com","atdotatdotat.at","oyakodon.m.to","paku.m.to","mstdn.mimikun.jp","mstdn.jp.net","mstdn.prfm.jp","pico8.social","social.denkbrettl.org","kttsakaba.net","mstdn.ntk.so","typing.sexy","howl.m.to","cxt.masto.host","mushroomkingdomdon.m.to","rungirls.run","thezombie.net","ostatus.yoh2.ddo.jp","social.elbmatsch.de","themepark.m.to","social.farend.co.jp","sc.sigmaris.info","mastodon-techdrive-staging.herokuapp.com","mstdn.albormentum.com","squope.net","mstdn.image-space.info","beyblader.top","md.regastream.com","huwa.m.to","azuchi.m.to","unkomaker.m.to","mastodon.prostreamers.net","anisodon.jp","mastodon.recurse.com","torus1111.m.to","thechurchofmemes.com","mastodon.binatang.nl","digilife.club","xn--kckk1cy297bor8a.jp","m.livetube.cc","resistance.hostdon.jp","hwdon.jp","mirohli.m.to","m.tatapa.org","tokotodon.m.to","mstdn.precure.fun","lab.oresys.nagoya","edge.taruntarun.net","taketodon.com","ple.ggtea.org","arm.m.to","m.rutan.info","mst.m544.net","omoch.m.to","puredon.matcha-soft.com","oidemasetodon.com","social.hideo54.com","don.m2hq.net","masto.tech","ehr.m.to","pom.m.to","sukadon.m.to","md.rhythmania.net","xxx.m.to","neumann.m.to","kiwaitsu.m.to","md.arg.vc","ore.m.to","napear.m.to","toot.lain.moe","josephburnett.social","toot.wiredpunch.com","asnas.m.to","typrout.ml","pleroma.kazuhiko.kitamura.name","mastodon.suncha.biz","pleroma.nakanod.net","morningcross.m.to","setl.ist","ohmidon.m.to","nonsta.m.to","iwami-mastodon.herokuapp.com","mag-mstdn.tki.jp","kiraako.work","nadesiko-users.info","pleroma.kitamurakz.com","mountainpeoples.m.to","ma.strangeworld.jp","estpls.m.to","shadowverdon.m.to","unidon.asmodeus.red","bangdream.m.to","local.iwamidon.tech","vawn.m.to","c2bdon.net","kent.m.to","scp.m.to","mastodon.gion.me","pleroma.playground.ws","mastodon.hakai-macaron.com","mastodon.sinkuu.xyz","mastodon-toyama.xyz","sabowl.m.to","mstdn.shizuoka.jp","kagerw.m.to","unity.m.to","mstdn.kemonox.jp","pantadoon.m.to","mastodon.lndvll.se","teatime.afternoonrobot.co.uk","mstdn.a-apple.net","md.net-p.org","mastodont.herokuapp.com","mastodon.lerelaisdupatriote.fr","snap.photo","paradise.engineering","hemohemo.m.to","mstdn.sk","lux.blue","soogle.m.to","yougaku20c.m.to","social.ash.bzh","hdhdhd.m.to","planner.social","yume.social","alpc-island.m.to","mstdn.yamachan.org","vegetadon.tokyo","mastodon.atikoro.net","pleroma.vocalodon.net","pompom.m.to","newtro.club","c-don.net","nerdica.net","mercury.social","h.ftqq.com","whiskycat.m.to","flashfic.stream","mstdn.bari-ikutsu.com","mdon.ee","weird.tf","playingwithworms.org.uk","mast.iankelling.org","mast.udon.moe","m.sirousa.me","cathuman.m.to","akashiensis.com","mastodon.babycastles.com","masto.fine.moe","japanweather.m.to","fnordica.de","mastodon.forza7.jp","m.themsp.org","raven.dog","ojitabi.club","bloodmountain.herokuapp.com","humuu.m.to","mcr.cool","clashroyalemastodon.com","mastodon.technick.org","rettiwtkcuf.social","social.korot.ru","mastodon.z27.ch","mstdn.mk39.xyz","newyorkdon.net","maron.blue","semi.m.to","friendica.me","comico.m.to","myc.m.to","fvhp-run.herokuapp.com","md.gloon.jp","mastodon.deafpros.com","negipan.m.to","cyber.cafe","gla.fit","cat.m.to","akiba-fan.com","znark.us","pouet.coazergues.info","quod.pl","nonsensoleum.net","igreally.social","mstdn.wood-built21.net","io.bennyp.org","knkr.m.to","social.gaos.org","mstdn.centossrv.com","okinawa-mstdn.okinawa","social.willistonschools.org","kernel32.de","arrowp5210.m.to","mstdn.naruh.com","mmodon.online","ascraeus.org","suku.m.to","mstdn.sh","mastodon.digitalkr.am","droogz.razvrat.org","msd.alohaloa.com","social.icewind.nl","mastodon.anti-globalism.org","mastodon.danbruno.net","motorsports.m.to","nanasi.m.to","sweettitties.scalingo.io","social.xmob.me","m.sysi.work","tooru.m.to","mastodon.nakanod.net","jonproulx.com","fukuoka.m.to","syui-ml.herokuapp.com","micro.koray.al","kimonosou.tokyo","mastodon.bertel-numerique.re","mastodon.newtown.chiba.jp","mstdn-kr.com","mastodon.spdns.org","comicsofcolor.club","miblog.life","758.fm","tantor.online","testodon.herokuapp.com","social.historyhorde.com","route66.social","co-mastdn.ga","mikuspot.net","raim0713.m.to","bona.space","nildon.com","toot.playground.ws","remicck.club","mstdn.ninja","mstdn.nahcnuj.work","mastodon-jp.org","mastodon.ebiryu.tech","millionimas.m.to","sisuclub.com","potaodon.audio","siidon.lab-kadokawa.com","ktstdn.m.to","pokedon.org","mstdn.yyuuiikk.org","awaodori.tokyo","yamagadon.com","beyblade.m.to","social.device5.co.uk","the-hash.m.to","mstdn.liliso.com","fam.vermeulen.id.au","talk.econudes.org","wabi.m.to","crusaders.m.to","fuzjkodon.m.to","otomachi.m.to","kkczjpn.m.to","nt50tec.m.to","magenta.click","owata.m.to","indyjp.club","mstdn-ent.com","api.m.to","yumejo.m.to","km-connect.org","metaller.m.to","mana9356.m.to","mofu.m.to","hyoga9f.m.to","zenyasai.g-fukurowl.club","00x.club","ysfh.m.to","mstdn-newprofession.jp","mstdn1.ssc-web.net","mstdn.sastudio.jp","hsgw.m.to","junkhub.org","mastodoooooon.herokuapp.com","walrein.m.to","syamuwatching.m.to","boyslove.jp","plrm.ht164.jp","oniko-branch.moe","v-hills.m.to","mogumogucombo.m.to","test.afn.social","atasinti.hostdon.jp","chicken.m.to","nutria.m.to","qtdon.m.to","mstdn.takanory.jp","home.m.to","stcpt.com","sw-mastodon.herokuapp.com","35o.poker","mastodon.chilos.jp","koya.m.to","mazzo.masto.host","mstdn.bitzeny.link","social.jp-mstdn.com","pan2.m.to","mobtodon.m.to","www.azuki-zenzai.net","gradiect.m.to","test.animedon.tk","miso.social","fehacking.xyz","sio.masto.host","uncensored.masto.host","balkan.fedive.rs","yutacar.info","servercan.xyz","odaidon.m.to","mst.k7mc.xyz","tokyoidolfestival.m.to","helloproject.m.to","igreally.masto.host","kancolle.social","mstdn.alnair.blue","nikatsudon.m.to","motodn.jp","turezure.m.to","basil.asria.jp","md.tret.jp","tera.m.to","kuncheff.social","tty.pw","xn--n8jycee5a4lmeyevltfzc2sja1jw105ewz3i.club","mstdn.s7t.de","taconiji.m.to","tibibibimbap.m.to","m.anyhu.gs","mastochizuru.xyz","nejiamasi.com","mastoidoljp.m.to","chat.cdstm.ch","social.ioserv.space","cornix.hostdon.jp","pangeon.jp","mstdn.ikasekai.com","friendica.sonatagreen.com","pachyderm.herokuapp.com","hqpf.site","guu.so","karakara.m.to","boss.taxi","satzcoal.com","listen.gallery","vidja.social","qatuno.de","toots.benpro.fr","timshomepage.net","empty.cafe","tooter.masto.host","mst-roa.m544.net","icmstdn.com","m.umbriel.fr","mastodon.mattjon.es","teacoffee.life","lianiis.m.to","makerdon.org","selfcare.masto.host","mastodon.dregin.com","crunchywatch.uk","voluntaryaction.network","sarubobo.red","cooperdon.com","mstdn.okin-jp.net","st.foresdon.jp","test.tegedon.net","piano.masto.host","bicyclemstdn.jp","social.gwadalug.org","happy-oss.y-zu.org","layer8.space","hub.sakuragawa.moe","mastodon.hakimus.de","blabla.maravitti.fr","mastodon.nekomimi.jp","postdon.com","mastodon.mocademia.jp","neritodon.xyz","sizedon.com","msyk.m.to","naf.m.to","sagatodon.m.to","mstdn.new-game.pw","md.sencic.com","toot.host","meow.m.to","t.cypv4.com","elephant-bike.herokuapp.com","t.unihubs.com","mastodon.starling.zone","mstdn-heroku.herokuapp.com","kokuchidon.net","mastodon.dominicdewolfe.com","aws.afn.social","social.literati.org","m.mtjm.eu","basictomonokai.m.to","mastodon.dustinwilson.com","mastodon.thequietplace.social","ostatus.lardbucket.org","hi.spooky.camp","mastodon.owls.io","pleroma.firechicken.net","social.timshomepage.net","social.ra-phi.ch","social.qwerjk.com","mastodon.h-sund.nu","social.lamowski.net","theoria.m.to","pleroma.distsn.org","mstdn.kitamurakz.com","nitic-mstdn.hostdon.jp","w3.freechinaweibo.com","toot.turbo.chat","coders.social","relativity.cafe","ps.s10y.eu","donphan.social","djs.social","mstdn.userzap.de","xn--69aa8bzb.xn--y9a3aq","ultrix.me","hax0rz.lol","sleeping.town","soc.freedombone.net","www.freechinaweibo.com","betoviet.m.to","mtn.gnlk.ovh","glaceon.social","mstdn.syoshida.org","social.mofu2charger-listenradio.net","linaro.tech","cosplay.m.to","digitalsoup.eu","social.symphonie-of-code.fr","kyunkyun.moe","mastodon.mynameisivan.ru","tecce.club","social.dxlb.nl","cmx.famousedu.com","hakomas.cf","dev.kirishima.cloud","dance-dance-dance.space","smj.m.to","yuikaoridon.m.to","mastodon.gamecircle.nova.0am.jp"];
+ 
+echo '<datalist id="mInstances">';
+	foreach($mInstancesArray as $row => $singleInstance){
+    	echo '<option value="'.$singleInstance.'" />';
+    }
+echo '</datalist>';
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/autopost-to-mastodon/js/settings_page.js b/wp-content/plugins/autopost-to-mastodon/js/settings_page.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c523459bca4b35660500e0ed676802a889f4b9c
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/js/settings_page.js
@@ -0,0 +1,41 @@
+jQuery(document).ready(function($) {  
+	//Select the right radio button for message on load
+	let textareaValue = $('textarea[name=message]').val();
+	$('input:radio[name=message_template]').prop("checked",false);
+	$('input[value="'+textareaValue+'"]').prop("checked", true);	
+
+	$('input:radio').parent().css({ opacity: 0.5 });;
+	$('input:radio:checked').parent().css({ opacity: 1 });;
+	
+	$('textarea[name=message]').change(function(){
+		$('input:radio[name=message_template]').prop("checked",false);
+		$('input[value="'+this.value+'"]').prop("checked", true);	
+	});
+	
+	//Show advanced config
+	$("#show_advanced_configuration").click(function(){ 
+			$(".not_advanced_setting").fadeOut("fast");
+			$("td.advanced_setting").fadeIn("slow");
+			$("tr.advanced_setting").fadeIn("slow").css("display","block");
+			$("#hide_advanced_configuration").removeClass("active");
+			$("#show_advanced_configuration").addClass("active");
+	});
+
+	//Hide advanced config
+	$("#hide_advanced_configuration").click(function(){ 
+			$(".advanced_setting").fadeOut("fast");
+			$(".not_advanced_setting").fadeIn("slow");
+			$("#show_advanced_configuration").removeClass("active");
+			$("#hide_advanced_configuration").addClass("active");
+	});
+	//Set the message value on radio select
+	$('input:radio[name=message_template]').change(function(){
+			let value = $('input:radio[name=message_template]:checked').val();
+			$('textarea[name=message]').val(value);
+	});
+
+	$('input:radio').change(function(){
+			$('input:radio').parent().css({ opacity: 0.5 });;
+			$('input:radio:checked').parent().css({ opacity: 1 });;
+	});
+});
diff --git a/wp-content/plugins/autopost-to-mastodon/languages/autopost-to-mastodon-de_DE.mo b/wp-content/plugins/autopost-to-mastodon/languages/autopost-to-mastodon-de_DE.mo
index f1d628c17df9b5c5d3683b309d1b7006f610cd5b..a9a5928389fa2e043c2202f4d519b7e81d40bafd 100644
Binary files a/wp-content/plugins/autopost-to-mastodon/languages/autopost-to-mastodon-de_DE.mo and b/wp-content/plugins/autopost-to-mastodon/languages/autopost-to-mastodon-de_DE.mo differ
diff --git a/wp-content/plugins/autopost-to-mastodon/languages/autopost-to-mastodon-de_DE.po b/wp-content/plugins/autopost-to-mastodon/languages/autopost-to-mastodon-de_DE.po
index 2dfa75aaacf2232568c9ae320e2857460e7a587c..cae4d815a521ee1bc0714dac6841a5b606d8fb3f 100644
--- a/wp-content/plugins/autopost-to-mastodon/languages/autopost-to-mastodon-de_DE.po
+++ b/wp-content/plugins/autopost-to-mastodon/languages/autopost-to-mastodon-de_DE.po
@@ -1,103 +1,98 @@
-#German Translation
-#for Mastdon Autopost Wordpress Plugin
+msgid "Mastodon Autopost Configuration"
+msgstr "Mastodon Autopost Konfiguration"
 
-#: post_meta_box.php
-msgid "Mastodon Autopost"
-msgstr "Mastodon Autopost"
+msgid "Simple configuration"
+msgstr "Einfache Konfiguration"
 
-msgid "Post to Mastodon"
-msgstr "Auf Mastdodon tooten"
+msgid "Advanced configuration"
+msgstr "Erweiterte Konfiguration"
 
-#: settings_page.php
-msgid "Server Settings"
-msgstr "Server Einstellungen"
+msgid "Instance"
+msgstr "Instanz"
 
-msgid "Server URL"
-msgstr "Server URL"
+msgid "Connected as"
+msgstr "Verbunden als"
 
-msgid "Email"
-msgstr "E-Mail"
+msgid "Connect to Mastodon"
+msgstr "Mit Mastodon verbinden"
 
-msgid "Password"
-msgstr "Passwort"
+msgid "Disconnect"
+msgstr "Trennen"
 
-msgid "Plugin Behavior"
-msgstr "Plugin Verhalten"
+msgid "Send test toot"
+msgstr "Test Toot senden"
 
-msgid "Also toot on Post Update"
-msgstr "Auch bei einem Post Update tooten"
+msgid "Disconnected"
+msgstr "Getrennt"
 
-msgid "Please provide the account details for the server."
-msgstr "Bitte gib die Accountdaten des Servers ein."
+msgid "Default Content Warning"
+msgstr "Standart Content Warnung"
 
-msgid "Configure the Plugin Behavior"
-msgstr "Konfiguriere das Plugin Verhalten"
+msgid "and"
+msgstr "und"
 
-msgid "Mastodon Autopost Settings"
-msgstr "Mastodon Autopost Einstellungen"
+msgid "You can use these metas in the message"
+msgstr "Du kannst folgende Metas in der Nachricht verwenden"
 
-msgid "Settings"
-msgstr "Einstellungen"
+msgid "Save configuration"
+msgstr "Konfiguration Speichern"
 
-msgid "Test Settings"
-msgstr "Einstellungen testen"
+msgid "Autopost new posts"
+msgstr "Neue Posts automatisch posten"
 
-msgid "Configure the Post"
-msgstr "Post konfigurieren"
+msgid "Authentification, please wait"
+msgstr "Bitte kurz warten"
 
-msgid "Global Post Hashtags"
-msgstr "Globale Post Hashtags"
+msgid "Toot mode"
+msgstr "Toot Modus"
 
-msgid "Save Settings"
-msgstr "Einstellungen speichern"
+msgid "Message"
+msgstr "Nachricht"
 
-msgid "Do you like Mastodon Autopost?"
-msgstr "Magst du Mastodon Autopost?"
+msgid "Toot size"
+msgstr "Toot Länge"
 
-msgid "Yes"
-msgstr "Ja"
+msgid "Can't log you in."
+msgstr "Login hat nicht funktioniert."
 
-msgid "Please rate the plugin"
-msgstr "Bitte bewerte das Plugin"
+msgid "Please login to your mastodon account!"
+msgstr "Bitte log dich in deinen Mastodon Account ein!"
 
-msgid "For getting the word out, it's important to have good reviews"
-msgstr "Um mehr Verbreitung zu finden sind gute Bewertungen ausschlaggebend"
+msgid "Go to Mastodon Autopost Settings"
+msgstr "Zu den Mastodon Autopost Einstellungen gehen"
 
-msgid "Rate on Wordpress.org"
-msgstr "Bewerte auf Wordpress.org"
+msgid "Instance message"
+msgstr "Instanz Nachricht"
 
-msgid "Consider participating.(e.g. With translating it into another language)"
-msgstr "Hilf mit das Plugin zu verbessern (z.B. in andere Sprachen übersetzen)"
+msgid "The given instance url belongs to no valid mastodon instance !"
+msgstr "Die eingegebene Url ist keine valide Mastodon Instanz !"
 
-msgid "Mastodon Autopost is on Github"
-msgstr "Mastodon Autopost ist auf Github zu finden"
+msgid "Thank you to set your Mastodon instance before connect !"
+msgstr "Danke für das einstellen der Mastodon Instanz !"
 
-msgid "Want to thank in another way?"
-msgstr "Anderweitig beitragen"
+msgid "Redirect to "
+msgstr "Weiterleiten zu "
 
-msgid "Buy me a Mate"
-msgstr "Gib mir ne Mate aus"
+msgid "Configuration successfully saved !"
+msgstr "Konfiguration wurde erfolgreich gespeichert!"
 
-msgid "No"
-msgstr "Nein"
+msgid "Toot saved for schedule !"
+msgstr "Toot für die Zukunft eingestellt !"
 
-msgid "Please give me feedback how your experience could be improved"
-msgstr "Bitte gib mir Feedback wie das Plugin verbessert werden kann"
+msgid "This is my first post with Mastodon Autopost for Wordpress"
+msgstr "Das ist mein erster Post mit Mastodon Autopost für Wordpress"
 
-msgid "Authentication"
-msgstr "Authetifizierung"
+msgid "Sorry, can't send toot !"
+msgstr "Entschuldigung, Toot kann nicht gesendet werden !"
 
-msgid "Login"
-msgstr "Login"
+msgid "Toot successfully sent !"
+msgstr "Toot erfolgreich gesendet !"
 
-msgid "Toot Visibility"
-msgstr "Toot Sichtbarkeit"
-
-msgid "Toot Format"
-msgstr "Toot Format"
+msgid "Toot on Mastodon"
+msgstr "Autopost auf Mastodon"
 
 msgid "Public"
-msgstr "Öffentlicj"
+msgstr "Öffentlich"
 
 msgid "Unlisted"
 msgstr "Nicht gelistet"
@@ -105,66 +100,11 @@ msgstr "Nicht gelistet"
 msgid "Private"
 msgstr "Privat"
 
-msgid "Title"
-msgstr "Titel"
-
-msgid "Content"
-msgstr "Inhalt"
-
-msgid "Link"
-msgstr "Link"
-
-msgid "Hashtags"
-msgstr "Hashtags"
-
-msgid "Enter Token"
-msgstr "Token aktivieren"
-
-msgid" Enter the token from the popup. If the popup is not opening visit the following url"
-msgstr "Geben sie den Token aus dem Popup ein. Falls sich das Popup nicht öffnet besuchen sie bitte folgende Webseite"
-
-#Toot Feedback
-
-msgid "Tooted to Mastodon!"
-msgstr "Auf Mastodon gepostet!"
-
-msgid "Mastodon instance not found! Is the URL correct?"
-msgstr "Mastodon Instanz nicht gefunden! Ist die URL korrekt?"
-
-msgid "Could not access mastodon profile! Are email and password correct?"
-msgstr "Mastodon Profil konnte nicht geöffnet werden! Sind Passwort und Email korrekt?"
-
-msgid "Uncaught mastodon error! Please contact the developer."
-msgstr "Unbekannter Mastodon Error! Bitte den Entwickler kontaktieren"
-
-msgid "Test Toot successfully tooted to Mastodon!"
-msgstr "Test Toot wurde erfoglreich auf Mastodon gepostet!"
-
-msgid "Open toot"
-msgstr "Toot öffnen"
-
-#general notice
-msgid "Seems like you are not logged into Mastodon Autopost! Please check the your login!"
-msgstr "Es sieht so aus als wären sie nicht bei Mastodon eingeloggt. Bitte überprüfen sie ihren login!"
-
-#Test Toot
-
-msgid "This is my first toot with the Autopost to Mastodon Wordpress Plugin"
-msgstr "Das ist mein erster Toot mit dem Autopost to Mastodon Wordpress Plugin"
-
-msgid "By clicking the \"Test Settings\" Button the following toot will be tooted to your mastodon profile:"
-msgstr "Beim Klick auf \"Einstellungen Testen\" wird der folgende Test Toot auf dein Mastodon Profil gepostet:"
-
-#javascript localization
-
-msgid "Enter the token from the popup"
-msgstr "Geben sie den Code aus dem Popup ein."
-
-msgid "Please login again and copy the shown code into the popup"
-msgstr "Bitte loggen sie sich erneut ein und kopieren sie den Code."
+msgid "Direct"
+msgstr "Direkt"
 
-msgid "Please include the following data in your email:"
-msgstr "Bitte fügen Sie die folgende Daten in Ihre Email ein:"
+msgid "characters"
+msgstr "Zeichen"
 
-msgid "Error Data:"
-msgstr "Error Daten:"
+msgid "View Toot"
+msgstr "Zum Toot"
\ No newline at end of file
diff --git a/wp-content/plugins/autopost-to-mastodon/mastodon_autopost.php b/wp-content/plugins/autopost-to-mastodon/mastodon_autopost.php
index 7f5bcb99901263973900434f47999fb500168366..29fac5089c09a209d9fe4c0a55a085fee007c0fd 100644
--- a/wp-content/plugins/autopost-to-mastodon/mastodon_autopost.php
+++ b/wp-content/plugins/autopost-to-mastodon/mastodon_autopost.php
@@ -1,50 +1,543 @@
 <?php
 /**
 * Plugin Name: Mastodon Autopost
-* Plugin URI: https://github.com/L1am0/mastodon_wordpress_autopost
+* Plugin URI: https://github.com/simonfrey/mastodon_wordpress_autopost
 * Description: A Wordpress Plugin that automatically posts your new articles to Mastodon
-* Version: 2.1
+* Version: 3.0
 * Author: L1am0
-* Author URI: http://www.l1am0.eu
+* Author URI: http://www.simon-frey.eu
 * License: GPL2
 * Text Domain: autopost-to-mastodon
 * Domain Path: /languages
 */
 
 
-//Wordpress Security function
-	defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
+require_once 'client.php';
 
-//Plugin internationalization hook
-   require("internationalization.php");
 
-//Get the mastodon api
-   require_once("MastodonOAuthPHP/theCodingCompany/HttpRequest.php");
-   require_once("MastodonOAuthPHP/theCodingCompany/oAuth.php");
-   require_once("MastodonOAuthPHP/theCodingCompany/Mastodon.php");
+class autopostToMastodon
+{
+	public function __construct(){
+		add_action( 'plugins_loaded', array($this, 'init' ) );
+		add_action( 'admin_enqueue_scripts', array($this, 'enqueue_scripts' ) );
+		add_action( 'admin_menu', array($this, 'configuration_page' ) );
+		add_action( 'save_post', array($this, 'toot_post' ) );
+		add_action( 'admin_notices', array($this, 'admin_notices' ) );
+		add_action( 'add_meta_boxes', array($this, 'add_metabox' ) );
+		add_action( 'publish_future_post', array($this, 'toot_scheduled_post') );
+		add_action( 'wp_ajax_get_toot_preview', array($this,'get_toot_preview_ajax_handler' ));
 
-	global $mastodon_api;
-	$mastodon_api = new \theCodingCompany\Mastodon();
+	}
 
-//Enque js
-    require("enque_scripts.php");
+	/**
+	 * Init
+	 *
+	 * Plugin initialization
+	 *
+	 * @return void
+	 */
+	public function init(){
+		$plugin_dir = basename( dirname( __FILE__ ) );
+		load_plugin_textdomain( 'autopost-to-mastodon', false, $plugin_dir . '/languages' );
 
-//Settings Page of Plugin
-    require("settings_page.php");
+		if(isset($_GET['code'])){
+			$code = $_GET['code'];
+			$client_id = get_option('autopostToMastodon-client-id');
+			$client_secret = get_option('autopostToMastodon-client-secret');
 
-//Meta box for single page - so choose for autopost
-    require("post_meta_box.php");
+			if(!empty($code) && !empty($client_id) && !empty($client_secret))
+			{
+				echo __( 'Authentification, please wait', 'autopost-to-mastodon' ) . '...';
 
-//Published Post Notification with actually sending the post
-    require("publish_post_notification.php");
+				update_option( 'autopostToMastodon-token', 'nada' );
 
-    global $mastodon_post_handler;
-    $mastodon_post_handler = new mastodon_post_handler();
+				$instance = get_option( 'autopostToMastodon-instance' );
+				$client = new Client($instance);
+				$token = $client->get_bearer_token($client_id, $client_secret, $code, get_admin_url());
 
-//Ajax response handler
-    require("ajax_handler.php");  
+				if(isset($token->error)){
+					print_r($token);
+					//TODO: Propper error message
+					update_option(
+						'autopostToMastodon-notice',
+						serialize(
+							array(
+								'message' => '<strong>Mastodon Autopost</strong> : ' . __( "Can't log you in.", 'autopost-to-mastodon' ) .
+								'<p><strong>' . __( 'Instance message', 'autopost-to-mastodon' ) . '</strong> : ' . $token->error_description . '</p>',
+								'class' => 'error',
+							)
+						)
+					);
+					unset($token);
+					update_option('autopostToMastodon-token', '');
+				}else{
+					update_option('autopostToMastodon-client-id', '');
+					update_option('autopostToMastodon-client-secret', '');
+					update_option('autopostToMastodon-token', $token->access_token);
+				}
+				$redirect_url = get_admin_url().'options-general.php?page=autopost-to-mastodon';
+			}
+			else
+			{
+				//Probably hack or bad refresh, redirect to homepage
+				$redirect_url = home_url();
+			}
 
-//Show login error messages
-    require("generalNotices.php"); 
+			wp_redirect($redirect_url);
+			exit;
+		}
 
+		$token = get_option('autopostToMastodon-token');
+		if (empty($token)){
+			update_option(
+				'autopostToMastodon-notice',
+				serialize(
+					array(
+						'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'Please login to your mastodon account!', 'autopost-to-mastodon' ) . '<a href="'.get_admin_url() . 'options-general.php?page=autopost-to-mastodon"> '. __( 'Go to Mastodon Autopost Settings', 'autopost-to-mastodon' ).'</a>',
+						'class' => 'error',
+					)
+				)
+			);
+		}
 
+	}
+
+	/**
+	 * Enqueue_scripts
+	 *
+	 * @return void
+	 */
+	public function enqueue_scripts($hook) {
+
+		global $pagenow;
+
+		$infos = get_plugin_data(__FILE__);
+		if($pagenow == "options-general.php"){
+			//We might be on settings page <-- Do you know a bette solution to get if we are in our own settings page?
+			$plugin_url = plugin_dir_url( __FILE__ );
+			wp_enqueue_script( 'settings_page', $plugin_url . 'js/settings_page.js', array('jquery'), $infos['Version'], true );
+
+		}
+		if ( in_array( $pagenow, [ 'post-new.php', 'post.php' ] ) ) {
+			$plugin_url = plugin_dir_url( __FILE__ );
+			wp_enqueue_script( 'toot_editor', $plugin_url . 'js/toot_editor.js', array('jquery'), $infos['Version'], true );
+
+			$title_nonce = wp_create_nonce( 'mastodonNonce' );
+			wp_localize_script( 'toot_editor', 'ajax_obj', array(
+				'ajax_url' => admin_url( 'admin-ajax.php' ),
+				'nonce'    => $title_nonce
+			) );
+		}
+	}
+
+	/**
+	 * Configuration_page
+	 *
+	 * Add the configuration page menu
+	 *
+	 * @return void
+	 */
+	public function configuration_page() {
+		add_options_page(
+			'Mastodon Autopost',
+			'Mastodon Autopost',
+			'install_plugins',
+			'autopost-to-mastodon',
+			array($this, 'show_configuration_page')
+		);
+	}
+
+	/**
+	 * Show_configuration_page
+	 *
+	 * Content of the configuration page
+	 *
+	 * @throws Exception The exception.
+	 * @return void
+	 */
+	public function show_configuration_page() {
+
+		wp_enqueue_style('autopostToMastodon-configuration', plugin_dir_url(__FILE__).'style.css');
+
+		if( isset( $_GET['disconnect'] ) ) {
+			update_option( 'autopostToMastodon-token' , '');
+		}elseif( isset( $_GET['testToot'] ) ) {
+			$this->sendTestToot();
+		}
+
+		$token = get_option( 'autopostToMastodon-token' );
+
+		if ( isset( $_POST['save'] ) ) {
+
+			$is_valid_nonce = wp_verify_nonce( $_POST['_wpnonce'], 'autopostToMastodon-configuration' );
+
+			if ( $is_valid_nonce ) {
+				$instance = esc_url( $_POST['instance'] );
+				$message = stripslashes($_POST['message']);
+				$content_warning = $_POST['content_warning'];
+
+				$client = new Client($instance);
+				$redirect_url = get_admin_url();
+				$auth_url = $client->register_app($redirect_url);
+
+				if ($auth_url == "ERROR"){
+					update_option(
+						'autopostToMastodon-notice',
+						serialize(
+							array(
+								'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'The given instance url belongs to no valid mastodon instance !', 'autopost-to-mastodon' ),
+								'class' => 'error',
+							)
+						)
+					);
+
+				}else{
+
+					if(empty($instance)){
+						update_option(
+							'autopostToMastodon-notice',
+							serialize(
+								array(
+									'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'Thank you to set your Mastodon instance before connect !', 'autopost-to-mastodon' ),
+									'class' => 'error',
+								)
+							)
+						);
+					} else 	{
+						update_option('autopostToMastodon-client-id', $client->get_client_id());
+						update_option('autopostToMastodon-client-secret', $client->get_client_secret());
+						update_option( 'autopostToMastodon-instance', $instance );
+
+						update_option( 'autopostToMastodon-message', sanitize_textarea_field( $message ) );
+						update_option( 'autopostToMastodon-mode', sanitize_text_field( $_POST['mode'] ) );
+						update_option( 'autopostToMastodon-toot-size', (int) $_POST['size'] );
+
+						if (isset($_POST['autopost_standard'])){
+							update_option( 'autopostToMastodon-postOnStandard', 'on' );
+						}else{
+							update_option( 'autopostToMastodon-postOnStandard', 'off' );	
+						}
+
+						update_option( 'autopostToMastodon-content-warning', sanitize_textarea_field( $content_warning ) );
+
+						$account = $client->verify_credentials($token);
+
+						if( isset( $account->error ) ){
+							echo '<meta http-equiv="refresh" content="0; url=' . $auth_url . '" />';
+							echo __( 'Redirect to ', 'autopost-to-mastodon' ) . $instance;
+							exit;
+						}
+
+					//Inform user that save was successfull
+						update_option(
+							'autopostToMastodon-notice',
+							serialize(
+								array(
+									'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'Configuration successfully saved !', 'autopost-to-mastodon' ),
+									'class' => 'success',
+								)
+							)
+						);
+
+					}
+				}
+
+				$this->admin_notices();
+			}
+		}
+
+		$instance = get_option( 'autopostToMastodon-instance' );
+
+		if( !empty( $token ) ) {
+			$client = new Client($instance);
+			$account = $client->verify_credentials($token);
+		}
+
+		$message = get_option( 'autopostToMastodon-message', "[title]\n[excerpt]\n[permalink]\n[tags]" );
+		$mode = get_option( 'autopostToMastodon-mode', 'public' );
+		$toot_size = get_option( 'autopostToMastodon-toot-size', 500 );
+		$content_warning = get_option( 'autopostToMastodon-content-warning', '');
+		$autopost = get_option( 'autopostToMastodon-postOnStandard', 'on');
+
+		include 'form.tpl.php';
+	}
+
+	/**
+	 * Toot_post
+	 * Post the toot
+	 *
+	 * @param int $id The post ID.
+	 * @return void
+	 */
+	public function toot_post( $id ) {
+
+		$post = get_post( $id );
+
+		$thumb_url = get_the_post_thumbnail_url($id, 'medium_large'); //Don't change the resolution !
+
+		$toot_size = (int) get_option( 'autopostToMastodon-toot-size', 500 );
+
+		$toot_on_mastodon_option = false;
+		$cw_content = (string) get_option( 'autopostToMastodon-content-warning', '' );
+
+		$toot_on_mastodon_option = isset( $_POST['toot_on_mastodon'] );
+
+		if ($toot_on_mastodon_option){
+			update_post_meta( $id, 'autopostToMastodon-post-status', 'on' );
+		}else{
+			if (get_post_meta($id, 'autopostToMastodon-post-status',true) == 'on'){
+				update_post_meta( $id, 'autopostToMastodon-post-status', 'off' );
+			}
+		}
+
+		if ( $toot_on_mastodon_option ) {
+			$message = $this->getTootFromTemplate($id);
+
+			if ( ! empty( $message ) ) {
+
+                //Save the toot, for scheduling
+				if($post->post_status == 'future') {
+					update_post_meta($id, 'autopostToMastodon-toot', $message);
+
+					if ( $thumb_url ) {
+
+						$thumb_path = str_replace( get_site_url(), get_home_path(), $thumb_url );
+						update_post_meta($id, 'autopostToMastodon-toot-thumbnail', $thumb_path);
+					}
+
+					update_option(
+						'autopostToMastodon-notice',
+						serialize(
+							array(
+								'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'Toot saved for schedule !', 'autopost-to-mastodon' ),
+								'class' => 'info'
+							)
+						)
+					);
+				} else if($post->post_status == 'publish') {
+
+					$instance = get_option( 'autopostToMastodon-instance' );
+					$access_token = get_option('autopostToMastodon-token');
+					$mode = get_option( 'autopostToMastodon-mode', 'public' );
+
+					$client = new Client($instance, $access_token);
+
+					if ( $thumb_url ) {
+
+
+						$thumb_path = str_replace( get_site_url(), get_home_path(), $thumb_url );
+						$attachment = $client->create_attachment( $thumb_path );
+
+						if(is_object($attachment))
+						{
+							$media = $attachment->id;
+						}
+					}
+
+					$toot = $client->postStatus($message, $mode, $media, $cw_content);
+
+					update_post_meta( $id, 'autopostToMastodon-post-status', 'off' );
+
+					add_action('admin_notices', 'autopostToMastodon_notice_toot_success');
+					if ( isset( $toot->error ) ) {
+						update_option(
+							'autopostToMastodon-notice',
+							serialize(
+								array(
+									'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'Sorry, can\'t send toot !', 'autopost-to-mastodon' ) .
+									'<p><strong>' . __( 'Instance message', 'autopost-to-mastodon' ) . '</strong> : ' . $toot->error . '</p>',
+									'class' => 'error',
+								)
+							)
+						);
+					} else {
+						update_option(
+							'autopostToMastodon-notice',
+							serialize(
+								array(
+									'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'Toot successfully sent !', 'autopost-to-mastodon' ). ' <a href="'.$toot->url.'" target="_blank">'. __('View Toot', 'autopost-to-mastodon') .'</a>',
+									'class' => 'success',
+								)
+							)
+						);
+						//Save the toot url for syndication
+						update_post_meta($id, 'autopostToMastodonshare-lastSuccessfullTootURL',$toot->url);
+					}
+				}
+
+			}
+		}
+	}
+
+	/**
+	 * Toot_scheduled_post
+	 * @param  integer $post_id
+	 */
+	public function toot_scheduled_post($post_id) {
+
+		$instance = get_option( 'autopostToMastodon-instance' );
+		$access_token = get_option('autopostToMastodon-token');
+		$mode = get_option( 'autopostToMastodon-mode', 'public' );
+
+		$message = get_post_meta($post_id, 'autopostToMastodon-toot', true);
+
+		$thumb_url = get_the_post_thumbnail_url($post_id);
+		$thumb_path = get_post_meta($post_id, 'autopostToMastodon-toot-thumbnail', true);
+
+		$client = new Client($instance, $access_token);
+
+		if ( $thumb_url ) {
+
+			$attachment = $client->create_attachment( $thumb_path );
+
+			if(is_object($attachment))
+			{
+				$media = $attachment->id;
+			}
+		}
+
+		$toot = $client->postStatus($message, $mode, $media);
+	}
+
+	/**
+	 * Admin_notices
+	 * Show the notice (error or info)
+	 *
+	 * @return void
+	 */
+	public function admin_notices() {
+
+		$notice = unserialize( get_option( 'autopostToMastodon-notice' ) );
+
+		if ( is_array( $notice ) ) {
+			echo '<div class="notice notice-' . sanitize_html_class( $notice['class'] ) . ' is-dismissible"><p>' . $notice['message'] . '</p></div>';
+			update_option( 'autopostToMastodon-notice', null );
+		}
+	}
+
+	/**
+	 * Add_metabox
+	 *
+	 * @return void
+	 */
+	public function add_metabox() {
+		add_meta_box(
+			'autopostToMastodon_metabox',
+			'Mastodon Autopost',
+			array($this, 'metabox'),
+			['post', 'page'],
+			'side',
+			'high'
+		);
+	}
+
+	/**
+	 * Metabox
+	 *
+	 * @param WP_Post $post the current post.
+	 * @return void
+	 */
+	public function metabox( $post ) {
+		if ( $post->post_title == '' && $post->post_content == ''){
+			$status = ('on' == (string) get_option('autopostToMastodon-postOnStandard', true));
+		}else{
+			$status = ('on' == (string) get_post_meta( $post->ID, 'autopostToMastodon-post-status', 'off' ));	
+		}
+
+		$checked = ( $status ) ? 'checked' : '';
+
+		echo '<div style="margin: 20px 0;"><input ' . $checked . ' type="checkbox" name="toot_on_mastodon" id="toot_on_mastodon" value="on">' .
+		'<label for="toot_on_mastodon">' . __( 'Toot on Mastodon', 'autopost-to-mastodon' ) . '</label></div>';
+
+	}
+
+
+
+
+	public function get_toot_preview_ajax_handler() {
+		check_ajax_referer( 'mastodonNonce' );
+
+		$return = array(
+			'message'  => $this->getTootFromTemplate($_POST['post_ID'])
+		);
+
+		wp_send_json( $return);
+	}
+
+	private function getTootFromTemplate($id){
+
+		$post = get_post( $id );
+		$toot_size = (int) get_option( 'autopostToMastodon-toot-size', 500 );
+
+
+		$message_template = get_option( 'autopostToMastodon-message', "[title]\n[excerpt]\n[permalink]\n[tags]" );
+
+				//Replace title
+		$post_title = get_the_title( $id );
+		$message_template = str_replace("[title]", $post_title, $message_template);
+
+				//Replace permalink
+		$post_permalink = get_the_permalink( $id );
+		$message_template = str_replace("[permalink]", $post_permalink, $message_template);
+
+				//Replace tags  
+		$post_tags = get_the_tags($post->ID);
+		$post_tags_content = '';
+		if ( $post_tags ) {
+			foreach( $post_tags as $tag ) {
+				$post_tags_content =  $post_tags_content . '#'.  preg_replace('/\s+/', '',$tag->name). ' '  ; 
+			}
+			$post_tags_content = trim($post_tags_content);
+		}
+		$message_template = str_replace("[tags]", $post_tags_content, $message_template);
+
+				//Replace excerpt
+		$post_content_long = wp_trim_words($post->post_content);
+		$excerpt_len = $toot_size - strlen($message_template) + 9 - 5;
+
+		$post_excerpt = substr($post_content_long,0,$excerpt_len) ."[...]";
+
+		$message_template = str_replace("[excerpt]", $post_excerpt, $message_template);
+
+
+		return substr($message_template,0,$toot_size);
+	}
+
+	private function sendTestToot(){
+		$instance = get_option( 'autopostToMastodon-instance' );
+		$access_token = get_option('autopostToMastodon-token');
+		$mode = 'public';
+
+		$client = new Client($instance, $access_token);
+		//TODO: Add propper message
+		$message=__("This is my first post with Mastodon Autopost for Wordpress",'autopost-to-mastodon'). " - https://wordpress.org/plugins/autopost-to-mastodon/";
+		$media=null;
+		$toot = $client->postStatus($message, $mode, $media);
+
+		if ( isset( $toot->error ) ) {
+			update_option(
+				'autopostToMastodon-notice',
+				serialize(
+					array(
+						'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'Sorry, can\'t send toot !', 'autopost-to-mastodon' ) .
+						'<p><strong>' . __( 'Instance message', 'autopost-to-mastodon' ) . '</strong> : ' . $toot->error . '</p>',
+						'class' => 'error',
+					)
+				)
+			);
+		} else {
+			update_option(
+				'autopostToMastodon-notice',
+				serialize(
+					array(
+						'message' => '<strong>Mastodon Autopost</strong> : ' . __( 'Toot successfully sent !', 'autopost-to-mastodon' ). ' <a href="'.$toot->url.'" target="_blank">'. __('View Toot', 'autopost-to-mastodon') .'</a>',
+						'class' => 'success',
+					)
+				)
+			);
+		}
+		$this->admin_notices();
+	}
+}
+
+$autopostToMastodon = new autopostToMastodon();
diff --git a/wp-content/plugins/autopost-to-mastodon/readme.txt b/wp-content/plugins/autopost-to-mastodon/readme.txt
index 43a5d4f16ca31689a380fda39d7cc8802b6b4e38..ae99e44256a3674093871d92a70f8c5e4c12e282 100644
--- a/wp-content/plugins/autopost-to-mastodon/readme.txt
+++ b/wp-content/plugins/autopost-to-mastodon/readme.txt
@@ -1,10 +1,11 @@
 === Mastodon Autopost ===
-Contributors: l1am0
+Contributors: l1am0, Hellexis
 Tags: mastodon, Mastodon, Mastdon Autopost, federated web, GNU social, statusnet, social web, social media, auto post
 Requires at least: 4.6
-Tested up to: 4.9.2
-Stable tag: 2.10
+Tested up to: 4.9.4
+Stable tag: 3.0
 License: GPLv2
+Donate link: https://liberapay.com/Mastodon-Auto-Share-Team/donate
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
  
 A Wordpress Plugin that automatically posts your new articles to Mastodon. The best: It is set and forget! 
@@ -13,24 +14,19 @@ A Wordpress Plugin that automatically posts your new articles to Mastodon. The b
 
 A Wordpress Plugin that automatically posts your new articles to Mastodon. The best: It is set and forget! 
  
-With GNUsocial Autopost your post always get automatically posted to your Mastodon account.
+With Mastodon Autopost your post always get automatically posted to your Mastodon account.
 
-There are two formats available: 
-Post title + Post URL + Hashtags
-Post title + Post Excerpt + Post URL + Hashtags
-
-Find the plugin settings: Settings > Mastodon Autpost Settings
+Find the plugin settings: Settings > Mastodon Autpost
 
 Just set your credentials and your post preference and lean back. The rest is done in the background and you don't have to care about it.
 
 For any questions, do not hesitate to contact me:
-*	Mail: mastodonautopost@l1am0.eu
-*	XMPP: l1am0@trashserver.net
+*	Mail: mastodonautopost@simon-frey.eu
 *	Mastodon: chaos.social/@l1am0
 
 Do you want to help translating this plugin in your language? [Visit the translation page](https://translate.wordpress.org/projects/wp-plugins/autopost-to-mastodon)
 
-Please consider donating via [Liberapay](https://liberapay.com/l1am0/donate) <3
+Please consider donating via [Liberapay](https://liberapay.com/Mastodon-Auto-Share-Team/donate) <3
 
 == Frequently Asked Questions ==
  
@@ -44,10 +40,16 @@ The plugin never transmits any data to me, or anyone else than the mastodon node
  
 == Screenshots ==
  
-1. Mastodon Autopost settings page
+1. Welcome site if you are not logged in
+2. Basic settings
+3. Advanced settings
 
 == Changelog ==
 
+= 3.0 =
+* Adapt to the base code of [kernox](https://github.com/kernox/Mastodon-Share-for-WordPress)
+* More error handling
+
 = 2.1 =
 * Also toot post hashtags (Thanks to [jops](https://mastodon.bida.im/@jops))
 
@@ -112,8 +114,8 @@ The plugin never transmits any data to me, or anyone else than the mastodon node
  
 == Credits ==
 
-= Mastodon PHP API =
-This project is using the [MastodonOAauthPHP libary](https://github.com/TheCodingCompany/MastodonOAuthPHP)
+= Kernox =
+This project is baseds on [hellexis Mastodon Share Plugin](https://github.com/kernox/Mastodon-Share-for-WordPress). We are currently working together on a new one to combine our workforce.
 
 = Graphics =
 Thanks to 
@@ -125,4 +127,4 @@ Thanks to
 
 
 = Idea =
-Special thanks to [Chris Riding](http://www.chrisridings.com/gnu-social-wordpress-plugin/) for inspiring this plugin with his original gnusocial project (GPLv2)
+Special thanks to [Chris Riding](http://www.chrisridings.com/gnu-social-wordpress-plugin/) for inspiring this plugin with his original gnusocial project (GPLv2)
\ No newline at end of file
diff --git a/wp-content/plugins/autopost-to-mastodon/style.css b/wp-content/plugins/autopost-to-mastodon/style.css
new file mode 100644
index 0000000000000000000000000000000000000000..add38992e403b4e6299fa9840bd3dd6281b02b57
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/style.css
@@ -0,0 +1,196 @@
+.wrap{
+	padding:10px;	
+	border-radius:10px;
+	min-height:100%;
+}
+.wrap h1, .wrap label, .wrap form  p{
+	color: #000;
+}
+
+.wrap .button{
+	color:#2b90d9 !important;
+	border-color:#2b90d9 !important;
+	box-shadow:none !important;
+	text-shadow:none !important;
+	font-weight:bold;
+}
+
+.wrap .button:hover{
+	background-color:transparent;
+}
+
+.wrap input, .wrap textarea{
+	background-color:transparent !important;
+	color:#000 !important;
+	border-color:#000;
+	border-radius:4px;
+}
+
+.wrap > form{
+	border:solid 1px #2b90d9;
+	padding:1%;
+	background-color:#FFF;
+}
+
+.spacer{
+	margin-top: 20px;
+}
+
+.account{
+	border: 1px solid #000;
+	padding: 15px;
+	border-radius:4px;
+	float:left;
+
+}
+
+.m-avatar{
+	float:left;
+	border-radius: 100px;
+	margin-right: 20px;
+	width: 60px;
+}
+
+.details{
+	float:left;
+}
+
+.details .link{
+	color:#000;
+	text-decoration: none;
+}
+
+.connected{
+	color: #2b90d9;
+	font-size: 16px;
+	font-weight:bold;
+	margin-bottom: 10px;
+}
+
+.disconnected{
+	color: #FF0000;
+	font-size: 16px;
+	text-align: center;
+	width: 100%;
+}
+
+.advanced_setting{
+	display:none;
+}
+
+
+.wrap .button:hover{
+	background-color:transparent;
+}
+
+.wrap input, .wrap textarea{
+	background-color:transparent !important;
+	color:#000 !important;
+	border-color:#000;
+	border-radius:4px;
+}
+.spacer{
+	margin-top: 20px;
+}
+
+.account{
+	border: 1px solid #000;
+	padding: 15px;
+	border-radius:4px;
+	float:left;
+
+}
+
+.m-avatar{
+	float:left;
+	border-radius: 100px;
+	margin-right: 20px;
+	width: 60px;
+}
+
+.details{
+	float:left;
+}
+
+.details .link{
+	color:#000;
+	text-decoration: none;
+}
+
+.connected{
+	color: #2b90d9;
+	font-size: 16px;
+	font-weight:bold;
+	margin-bottom: 10px;
+}
+
+.disconnected{
+	color: #FF0000;
+	font-size: 16px;
+	text-align: center;
+	width: 100%;
+}
+
+.advanced_setting{
+	display:none;
+}
+
+
+label{
+	display:inline-block;
+	vertical-align: bottom;
+	text-align:center;
+}
+
+.messageRadioButtons label{
+	padding:10px;
+	border:dashed 2px #000;
+	opacity:0.5;
+}
+
+.scopeRadioButtons label{
+	opacity:0.5;
+	margin-right:1em;
+}
+
+input[type="radio"]{
+	display:none;	
+}
+
+.github-icon{
+	margin-right: 10px;
+	text-decoration: none;
+	position: relative;
+}
+
+html > body .liberapay-btn{
+	margin-top: 3px;
+    position: absolute;
+}
+
+.github-icon{
+	margin-right: 10px;
+	text-decoration: none;
+	position: relative;
+}
+
+.modeIcon{
+	height:1em;
+}
+
+html > body .liberapay-btn{
+	margin-top: 3px;
+    position: absolute;
+}
+
+.tab-button{
+	text-align:center;
+	margin-bottom:-1px !important;
+	border-bottom:none !important;
+	border-radius:0 !important;
+}
+
+.tab-button.active{
+	background-color:#FFF !important;
+	margin-bottom:-0px !important;
+}
diff --git a/wp-content/plugins/autopost-to-mastodon/uninstall.php b/wp-content/plugins/autopost-to-mastodon/uninstall.php
new file mode 100644
index 0000000000000000000000000000000000000000..3dcd0c2af7d5627514a2466674b30402e5a99ad2
--- /dev/null
+++ b/wp-content/plugins/autopost-to-mastodon/uninstall.php
@@ -0,0 +1,13 @@
+<?php
+if (!defined('WP_UNINSTALL_PLUGIN')) {
+    die;
+}
+
+delete_option( 'autopostToMastodon-client-id' );
+delete_option( 'autopostToMastodon-client-secret' );
+delete_option( 'autopostToMastodon-token' );
+delete_option( 'autopostToMastodon-instance' );
+delete_option( 'autopostToMastodon-message' );
+delete_option( 'autopostToMastodon-mode' );
+delete_option( 'autopostToMastodon-toot-size' );
+delete_option( 'autopostToMastodon-notice' );
\ No newline at end of file