diff --git a/index.user.js b/index.user.js
index b947ec6..860fdc2 100644
--- a/index.user.js
+++ b/index.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name MastodonTranslate
// @namespace https://niu.moe/@tomo
-// @version 1.7.4
+// @version 1.7.5
// @description Provides a translate toot option for Mastodon users via GoogleTranslate
// @author tomo@uchuu.io / https://niu.moe/@tomo
// @match *://*/web/*
@@ -142,13 +142,14 @@
var actions = document.querySelector('div.actions');
var settingsGroup = form.querySelector('div.fields-group').cloneNode(true);
- settingsGroup.children[1].remove(); // Remove the privacy element from the clone
+ settingsGroup.children[1].remove(); // Remove the posting language
+ settingsGroup.children[1].remove(); // Remove the filtered language
var notice = document.createElement('div');
var noticeMsg = 'Translation is currently provided by Google Translate, if you\'re not happy with this please don\'t check the checkbox below or just uninstall the script. I\'m looking to offer alternatives to Google which you can track here: https://github.com/tomouchuu/mastodon-translate/issues/6';
noticeMsg += '
If you have an issue please give me a buzz @tomo@niu.moe via mastodon or raise an issue on Github';
notice.setAttribute('id', 'translation_notice');
- notice.innerHTML = '
'+noticeMsg+'
'; + notice.innerHTML = ''+noticeMsg+'
'; var toggle = document.createElement('div'); toggle.classList.add('input'); @@ -169,11 +170,12 @@ input.setAttribute('name', 'user[translation]'); input.setAttribute('id', 'translation_locale'); input.value = localStorage.getItem('lang'); + languageDiv.children[1].textContent = 'The language to translate toots into'; settingsGroup.insertBefore(notice, languageDiv); settingsGroup.insertBefore(toggle, languageDiv); - form.insertBefore(settingsGroup, actions); + form.insertBefore(settingsGroup, actions.nextSibling); document.querySelector('body').addEventListener('click', saveSettings, false); } diff --git a/readme.md b/readme.md index a34f039..3688ced 100644 --- a/readme.md +++ b/readme.md @@ -14,7 +14,7 @@ Next head to your instance and head to your preferences (/settings/preferences) ### What it does -Upon clicking the ellipsis (...) you should see an option to translate toot, click this and it will translate the toot via GoogleTranslate proxy (https://github.com/uchuuio/translate-server || https://translate.uchuu.io) into english by default. To change this to your desired language, head to your mastodon preferences in settings and you should see an option for translate language. Select the language you'd like and then save changes, head back to the feed and refresh the page. +Upon clicking the ellipsis (...) you should see an option to translate toot, click this and it will translate the toot via a GoogleTranslate proxy (https://github.com/uchuuio/translate-server || https://translate.uchuu.io) into english by default. To change this to your desired language, head to your mastodon preferences in settings and you should see an option for translate language. Select the language you'd like and then save changes, head back to the feed and refresh the page. If you haven't yet agreed to using Google Translate it will take you to your preferences page where you can enable this option.