Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukesaitoh committed Mar 27, 2021
2 parents afa45c0 + ccdc94a commit b2c3252
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 6 deletions.
3 changes: 3 additions & 0 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"titleIsWhoToFollowHidden": {
"message": "Hide Who to follow"
},
"titleIsFontChanged": {
"message": "Change Japanese font from Meiryo to Hiragino on Mac"
},
"titleAdditionalSettings": {
"message": "Additional settings"
},
Expand Down
3 changes: 3 additions & 0 deletions app/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
"titleIsWhoToFollowHidden": {
"message": "おすすめユーザーを隠す"
},
"titleIsFontChanged": {
"message": "Macで日本語フォントをメイリオからヒラギノに変更"
},
"titleAdditionalSettings": {
"message": "追加設定"
},
Expand Down
2 changes: 1 addition & 1 deletion app/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "__MSG_appName__",
"short_name": "__MSG_appShortName__",
"description": "__MSG_appDescription__",
"version": "1.1.6",
"version": "1.2.0",
"manifest_version": 2,
"default_locale": "en",
"icons": {
Expand Down
4 changes: 4 additions & 0 deletions app/pages/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ <h2>__MSG_titleAdditionalSettings__</h2>
<input type="checkbox" id="isTopicsToFollowHidden">
<span>__MSG_titleIsTopicsToFollowHidden__</span>
</label>
<label class="check">
<input type="checkbox" id="isFontChanged">
<span>__MSG_titleIsFontChanged__</span>
</label>
<script src="../scripts/popup.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions app/scripts/contentscript.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
toggleClass(["isExploreHidden", "isTrendsHidden", "isReactionNumberHidden", "showCalmText", "isFollowingNumberHidden", "isFollowerNumberHidden", "isReactionNumberAlwaysHidden", "isWhoToFollowHidden", "isTopicsToFollowHidden"]);
toggleClass(["isExploreHidden", "isTrendsHidden", "isReactionNumberHidden", "showCalmText", "isFollowingNumberHidden", "isFollowerNumberHidden", "isReactionNumberAlwaysHidden", "isWhoToFollowHidden", "isTopicsToFollowHidden", "isFontChanged"]);
addCalmTitle();
for (let i = 0; i < 2; i++) {
setTimeout(changeCalmColor, (i + 1)*100);
Expand All @@ -7,7 +7,7 @@ for (let i = 0; i < 2; i++) {
function toggleClass(keys: string[]) {
chrome.storage.local.get(keys, function (data) {
keys.forEach(key => {
if (key === "isFollowingNumberHidden" || key === "isFollowerNumberHidden" || key === "isReactionNumberAlwaysHidden" || key === "isWhoToFollowHidden" || key === "isTopicsToFollowHidden") {
if (key === "isFollowingNumberHidden" || key === "isFollowerNumberHidden" || key === "isReactionNumberAlwaysHidden" || key === "isWhoToFollowHidden" || key === "isTopicsToFollowHidden" || key === "isFontChanged") {
if (typeof data[key] === "undefined") {
data[key] = false;
}
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/popup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
localize();
initValues(["isExploreHidden", "isTrendsHidden", "isReactionNumberHidden", "showCalmText", "isFollowingNumberHidden", "isFollowerNumberHidden", "isReactionNumberAlwaysHidden", "isWhoToFollowHidden", "isTopicsToFollowHidden"]);
initValues(["isExploreHidden", "isTrendsHidden", "isReactionNumberHidden", "showCalmText", "isFollowingNumberHidden", "isFollowerNumberHidden", "isReactionNumberAlwaysHidden", "isWhoToFollowHidden", "isTopicsToFollowHidden", "isFontChanged"]);

function localize() {
var objects = document.getElementsByTagName('html');
Expand Down Expand Up @@ -37,7 +37,7 @@ function toggleChecked(keys: string[]) {
chrome.storage.local.get(keys, function (data) {
keys.forEach(key => {
console.log(key + ": " + data[key]);
if (key === "isFollowingNumberHidden" || key === "isFollowerNumberHidden" || key === "isReactionNumberAlwaysHidden" || key === "isWhoToFollowHidden" || key === "isTopicsToFollowHidden") {
if (key === "isFollowingNumberHidden" || key === "isFollowerNumberHidden" || key === "isReactionNumberAlwaysHidden" || key === "isWhoToFollowHidden" || key === "isTopicsToFollowHidden" || key === "isFontChanged") {
if (typeof data[key] === "undefined") {
data[key] = false;
}
Expand Down
6 changes: 6 additions & 0 deletions app/styles/contentscript.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,10 @@ body {
}
}
}

&.isFontChanged {
.r-1tl8opc {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "calm-twitter",
"private": true,
"version": "1.1.6",
"version": "1.2.0",
"description": "This extension hides trending information from twitter timelines to make your mind calm.",
"scripts": {
"start": "npm run dev:chrome",
Expand Down

0 comments on commit b2c3252

Please sign in to comment.