Skip to content

Instantly share code, notes, and snippets.

View PlanetTheCloud's full-sized avatar

PlanetCloud PlanetTheCloud

  • Planet Dev Network
  • Indonesia
View GitHub Profile
@PlanetTheCloud
PlanetTheCloud / paynow.js
Created October 28, 2025 19:54 — forked from chengkiang/paynow.js
SG PayNow QR Code Generator Sample
String.prototype.padLeft = function (n, str) {
if (n < String(this).length) {
return this.toString();
}
else {
return Array(n - String(this).length + 1).join(str || '0') + this;
}
}
function crc16(s) {
@PlanetTheCloud
PlanetTheCloud / GoogleFormsCalculateScore.js
Last active April 13, 2022 01:51
Calculate Accuracy Score in Google Forms
var GoogleFormsTool = {
getScore() {
let correct = document.getElementsByClassName('freebirdFormviewerViewItemsItemCorrect'),
incorrect = document.getElementsByClassName('freebirdFormviewerViewItemsItemIncorrect'),
total = correct.length + incorrect.length,
incorrectDisplay = [],
yIncrement = 0;
for (let k of incorrect) {
k.parentElement.id = "gfcs_incorrect_" + yIncrement++;