Script Kit Logo
Script Kit
by John Lindquist

Scripts by alkene0005

A simple calculator using js expressions

alkene0005's avatar
Alken E
// Name: JS Expression
// Description: I prefer to define it as a simple calculator
// Global Objects
let arr = [1, 2, 3, 4, 5]
let obj = {name: 'Mike', age: 20}
// Global Functions
let {
ceil, floor, round, trunc, abs, PI,
sin, cos, tan, log, log2, log10, exp, sqrt, cbrt, pow
} = Math
// Factorial
let fact = num => _.reduce(_.range(1, num + 1), (acc, i) => acc * i, 1)
let selected = await arg({
placeholder: 'Expression ...',
enter: 'Copy & Exit',
shortcuts: [{
18 lines below • View full script

Quick Search Steam Game

alkene0005's avatar
Alken E
// Name: Steam
import axios from 'axios'
import cheerio from 'cheerio'
// Language-dependent configuration
const cc = 'US'
const l = 'english'
function buildResult(value, image, title) {
return {
name: 'abc',
value: value,
html: `
<div class="flex flex-row h-full w-full">
<img class="h-full" src="${image}"/>
<h2 class="flex-1 flex flex-row items-center justify-center">${title}</h2>
<div class="flex flex-row text-xxs items-center justify-right">open</div>
</div>
`,
37 lines below • View full script