Created
June 20, 2019 05:04
-
-
Save Permik/8bba428bd7762e8c85b8459d501e818e to your computer and use it in GitHub Desktop.
//FI-fi Pieni scripti jolla voi lisätä ostoskoriin nimilaput listasta löytyvillä nimillä. //EN-us A small script that'll add name tags made of names in the list to the shopping cart.
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
// Käytä scriptiä tällä sivulla https://www.varusteleka.fi/fi/product/sarma-tst-m05-nimilappu-omalla-tekstilla-3-kpl/35030 | |
// Use the script in this page https://www.varusteleka.com/en/product/sarma-tst-m05-name-tag-w-custom-text-3-pcs/35030 | |
// Luo lista tällä (Jos nimet kerätty laskentataulukon sarakkeeseen, copy-paste) https://thdoan.github.io/mr-data-converter/ | |
// Create list with (If you've collected the names into a spreadsheet column, copy-paste) https://thdoan.github.io/mr-data-converter/ | |
// 1. Avaa sivulla sen tyyppinen nimilappu joita haluat tilata | |
// 1. Open the type of name tag you want, in the page | |
// 2. Avaa selaimen konsoli (Win/Linux: Ctrl + Shift + J or F12, macOS: Alt/Option + Cmd + J) | |
// 2. Open the browser console (Win/Linux: Ctrl + Shift + J or F12, macOS: Alt/Option + Cmd + J) | |
// 3. Liitä scripti konsoliin, josta lista korvattu haluamallasi nimillä | |
// 3. Paste the script to the console with your own list of desired names | |
// 4. Suorita! | |
// 4. Run! | |
nameList = {"val0":["JANNINE","SPIRIT","KRISTINE","LEANORA","TEAGAN","PERONEL","HARVE","KIERAN","RITCHIE","SKYLER","ORPHA","RIGBY","RILEY","CHARMAINE","RACHAEL","MALVINA","DENTON","CARLISLE","ISBEL","JOSEPHINE"]} | |
buyButton = document.querySelector('#buy_button_red') | |
inputField = document.querySelector('#nametags_input_field') | |
nameList.val0.forEach( | |
function(item){ | |
console.log(item); | |
inputField.value = item; | |
buyButton.click(); | |
console.log(`${item} lisätty ostoskoriin!\n added to the shopping cart!`); | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Testattu toimivuutta 11/07/2022 Chrome versiolla 105.0.5172.0.
Ei toimi enää, olen kirjoittamassa selainlisäosaa joka lisää sivulle laatikon jonka avulla voit lisätä usean nimilapun ostoskoriin kerralla.