Skip to content

Commit 204c648

Browse files
committed
- changes
1 parent 111e1fc commit 204c648

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Wiki 2 Note",
44
"version": "1.0.4",
55
"minAppVersion": "0.15.0",
6-
"description": "Gives the user the ability to generate a Note from a Wikipedia article.",
6+
"description": "Generate a Note from a Wikipedia article.",
77
"author": "Johannes Hans",
88
"authorUrl": "https://github.com/CommandJoo",
99
"fundingUrl": "",

src/ModalMultiple.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class WikiMultiModal extends Modal {
3131
const {contentEl} = this;
3232
contentEl.classList.add("wiki-modal");
3333

34-
contentEl.createEl('label', { text: 'Name of the Wikipedia Entries:' });
34+
contentEl.createEl('label', { text: 'Name of the Wikipedia entries:' });
3535
contentEl.createEl('label', {text: 'Click text field to add more...'});
3636
this.input = [];
3737
const firstInput = contentEl.createEl("input", {type: "text"});

src/PluginSettings.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class WikiSettingsTab extends PluginSettingTab {
2929

3030
new Setting(containerEl)
3131
.setName('Country prefix')
32-
.setDesc("The prefix you want for the Language you use.Example: *en*.wikipedia.org")
32+
.setDesc("The prefix you want for the language you use. Example: *en*.wikipedia.org")
3333
.addDropdown((dropdown) => {
3434

3535
for(let i = 0; i < LANGUAGE_CODES.length; i++) {
@@ -44,8 +44,8 @@ class WikiSettingsTab extends PluginSettingTab {
4444
});
4545
});
4646
new Setting(containerEl)
47-
.setName('Table Background')
48-
.setDesc("The Background color of Tables or Images")
47+
.setName('Table background')
48+
.setDesc("The background color of tables or images")
4949
.addColorPicker((color) => {
5050

5151
color.setValue(this.plugin.settings.tableBackground);
@@ -55,8 +55,8 @@ class WikiSettingsTab extends PluginSettingTab {
5555
});
5656
});
5757
new Setting(containerEl)
58-
.setName('Table Border')
59-
.setDesc("The Border color of Tables or Images")
58+
.setName('Table border')
59+
.setDesc("The border color of tables or images")
6060
.addColorPicker((color) => {
6161

6262
color.setValue(this.plugin.settings.tableBorder);

src/WikipediaNote.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {WikiPluginSettings} from "./PluginSettings";
22
import axios from "axios";
33
import * as cheerio from "cheerio";
44
import TurndownService from "turndown";
5-
import {Notice} from "obsidian";
5+
import {Notice, requestUrl} from "obsidian";
66

77
class WikipediaNote {
88
private settings: WikiPluginSettings;
@@ -35,8 +35,8 @@ async function createAndOpenNote(fileName: string, content: string) {
3535
async function cleanWikiHtml(title: string, countryPrefix: string) {
3636
const url = `https://${countryPrefix}.wikipedia.org/api/rest_v1/page/html/${encodeURIComponent(title)}`;
3737
try {
38-
const response = await axios.get(url, {headers: {"User-Agent": "WikiToMarkdownBot/1.0"}});
39-
const $ = cheerio.load(response.data);
38+
const response = await requestUrl({url, headers: {"User-Agent": "WikiToMarkdownBot/1.0"}});
39+
const $ = cheerio.load(response.text);
4040
$("style").remove();
4141
const $e = $("*");
4242
$e.removeAttr("rel");

0 commit comments

Comments
 (0)