Skip to content

Instantly share code, notes, and snippets.

View Qard's full-sized avatar
👨‍💻
In an epic battle with my keyboard.

Stephen Belanger Qard

👨‍💻
In an epic battle with my keyboard.
View GitHub Profile
@Qard
Qard / userscript.js
Created December 21, 2023 07:13 — forked from fanuch/userscript.js
Block Click to Edit on Jira Issue
// ==UserScript==
// @name Disable Jira Click Edit
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Disable click edit in Jira issue descriptions
// @author fanuch
// @match https://*.atlassian.net/browse/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=atlassian.net
// @grant none
// ==/UserScript==
#include "js_api.h"
// Sometimes you want to access the js "this" value in a function
// function Point(x, y) { this.x = x; this.y = y; }
bool point_constructor(js_context* C) {
js_set(C, 0, "x", 1); // this.x = arguments[0]
js_set(C, 0, "y", 2); // this.y = arguments[1]
return true; // js returns undefined, but C returns true meaning no error.
}