This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @name Shanbay News Word Space | |
// @namespace https://github.com/ninja33 | |
// @version 0.1 | |
// @description Add space between words of Shanbay news article. | |
// @author Ninja Huang | |
// @match https://www.shanbay.com/news/articles/* | |
// @grant none | |
// ==/UserScript== | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadJsonp(url, callback) { | |
var callbackName = 'jsonp_callback_' + Math.round(100000 * Math.random()); | |
window[callbackName] = function (data) { | |
delete window[callbackName]; | |
document.body.removeChild(script); | |
callback(data); | |
}; | |
var script = document.createElement('script'); | |
script.src = url + (url.indexOf('?') >= 0 ? '&' : '?') + 'callback=' + callbackName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var word = 'test'; | |
fetch('https://dict.youdao.com/w/'+word).then(r=>r.text()).then(html=>{console.log((new DOMParser()).parseFromString(html, 'text/html').querySelector('#phrsListTab .trans-container').textContent)}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global api */ | |
class enpl_Cambridge { | |
constructor(options) { | |
this.options = options; | |
this.maxexample = 2; | |
this.word = ''; | |
} | |
async displayName() { | |
return 'Cambridge EN->PL Dictionary'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global api */ | |
class encn_Cambridge_tc { | |
constructor(options) { | |
this.options = options; | |
this.maxexample = 2; | |
this.word = ''; | |
} | |
async displayName() { | |
let locale = await api.locale(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global api */ | |
class esen_Spanishdict { | |
constructor(options) { | |
this.options = options; | |
this.maxexample = 2; | |
this.word = ''; | |
} | |
async displayName() { | |
let locale = await api.locale(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global api */ | |
class decn_Eudict { | |
constructor(options) { | |
this.options = options; | |
this.maxexample = 2; | |
this.word = ''; | |
} | |
async displayName() { | |
let locale = await api.locale(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global api */ | |
class encn_TestDict { | |
constructor(options) { | |
this.options = options; | |
this.maxexample = 2; | |
this.word = ''; | |
} | |
async displayName() { | |
let locale = await api.locale(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global api */ | |
class finnZhDictionary { | |
constructor(options) { | |
this.apiUrl = "https://www.sanakirja.fi/api/search/api/sk/search"; | |
this.headers = { | |
"Accept": "application/json", | |
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNzIyNzcyODY4LCJqdGkiOiIzNjcxYmFlYS05M2Y3LTRiMDItOGEzZi0yYjg2N2Q0OGY3ZDkiLCJ0eXBlIjoiYWNjZXNzIiwiaWRlbnRpdHkiOnsidXNlcl9pZCI6IjViZWRlNjhmLTIxZmYtNDE3Ny1iZDBiLWU0YjU5NWNhM2I2NSIsImNsaWVudCI6IkdVNzdSeTRMWThhOEc3NElCZzAzQm5WMDhBNTQ2azY1IiwiY2xpZW50X25hbWUiOiJzYW5ha2lyamEifSwibmJmIjoxNzIyNzcyODY4LCJleHAiOjE3MjI3NzY0NjgsInVzZXJfY2xhaW1zIjp7Imhhc1ByZW1pdW1Db250ZW50Ijp0cnVlLCJzdGF0c1VzZXJUeXBlIjoidHJpYWwifX0.ZJUSoindRSjoxz-x9hhBaKVxBEsFS2K4qjooq0pBjcQ", | |
"Content-Type": "application/json", | |
"Cookie": "xxoo-tmp=en-US", | |
"Ngsw-Bypass": "true", |