Skip to main content
Replace the dead link. Reference: https://meta.stackexchange.com/q/239231
Source Link

Screenshot

Easy reference to 2:255

About

At Islam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.orgFrom userscripts.org

Code

http://userscripts.org/scripts/review/466443https://userscripts-mirror.org/scripts/review/466443

Bugs

Please report bugs here in the answers sections.

Screenshot

Easy reference to 2:255

About

At Islam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.org

Code

http://userscripts.org/scripts/review/466443

Bugs

Please report bugs here in the answers sections.

Screenshot

Easy reference to 2:255

About

At Islam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.org

Code

https://userscripts-mirror.org/scripts/review/466443

Bugs

Please report bugs here in the answers sections.

replaced http://islam.stackexchange.com/ with https://islam.stackexchange.com/
Source Link

Screenshot

Easy reference to 2:255

About

At Islam Stack ExchangeIslam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.org

Code

http://userscripts.org/scripts/review/466443

Bugs

Please report bugs here in the answers sections.

Screenshot

Easy reference to 2:255

About

At Islam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.org

Code

http://userscripts.org/scripts/review/466443

Bugs

Please report bugs here in the answers sections.

Screenshot

Easy reference to 2:255

About

At Islam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.org

Code

http://userscripts.org/scripts/review/466443

Bugs

Please report bugs here in the answers sections.

moved screenshot to own section; general polish
Source Link
Mohammad
  • 213
  • 1
  • 9

Screenshot

Easy reference to 2:255

About

At Islam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.org

Code

http://userscripts.org/scripts/review/466443

// ==UserScript==
// @name         quran links
// @namespace    me
// @description  Automatically adds links to a quran verse
// @version    1.1.5
// @match      http://islam.stackexchange.com/*
// @grant       none  
// ==/UserScript==
function with_jquery(f) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.textContent = "(" + f.toString() + ")(jQuery)";
    document.body.appendChild(script);
}

with_jquery(function($) {
$(document).ready(function(){   
var form = document.createElement("form");
form.id = "F";

var div = document.createElement("div");
div.id = "quran";

var input=document.createElement("input");
input.type="text";
input.id="b1";

var input2= document.createElement("input");
input2.type="submit";
input2.id="b2";
input2.value = "Add";


if ($(".wmd-input").length)
{
$(".wmd-input").before(form);
form.appendChild(div);
div.appendChild(input);
div.appendChild(input2);


$("#b2").css( 'display','none');
var wmd = $("#wmd-input");
var $b1 = $("#b1")
$b1.attr('placeholder', '23:52').css({ 'width': '92', 'hight' : '16',});
$('#F').submit(function (e) {
 e.preventDefault();
  wmd.val( wmd.val() ?( wmd.val() + "[[" + $b1.val() + "]](http://tanzil.net/#" + $b1.val()+ ")"  ): ( "[["+ $b1.val() + "]](http://tanzil.net/#"+ $b1.val()+ ")" ));
  return false;
});

}
});
});

Bugs

Please report bugs here in the answers sections.

Screenshot

Easy reference to 2:255

About

At Islam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.org

Code

http://userscripts.org/scripts/review/466443

// ==UserScript==
// @name         quran links
// @namespace    me
// @description  Automatically adds links to a quran verse
// @version    1.1.5
// @match      http://islam.stackexchange.com/*
// @grant       none  
// ==/UserScript==
function with_jquery(f) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.textContent = "(" + f.toString() + ")(jQuery)";
    document.body.appendChild(script);
}

with_jquery(function($) {
$(document).ready(function(){   
var form = document.createElement("form");
form.id = "F";

var div = document.createElement("div");
div.id = "quran";

var input=document.createElement("input");
input.type="text";
input.id="b1";

var input2= document.createElement("input");
input2.type="submit";
input2.id="b2";
input2.value = "Add";


if ($(".wmd-input").length)
{
$(".wmd-input").before(form);
form.appendChild(div);
div.appendChild(input);
div.appendChild(input2);


$("#b2").css( 'display','none');
var wmd = $("#wmd-input");
var $b1 = $("#b1")
$b1.attr('placeholder', '23:52').css({ 'width': '92', 'hight' : '16',});
$('#F').submit(function (e) {
 e.preventDefault();
  wmd.val( wmd.val() ?( wmd.val() + "[[" + $b1.val() + "]](http://tanzil.net/#" + $b1.val()+ ")"  ): ( "[["+ $b1.val() + "]](http://tanzil.net/#"+ $b1.val()+ ")" ));
  return false;
});

}
});
});

Bugs

Please report bugs here in the answers sections.

Screenshot

Easy reference to 2:255

About

At Islam Stack Exchange we often refer to Quran verses in answers. This script makes it easier to add those references by adding an input field directly before the question/answer field.

Installation

From userscripts.org

Code

http://userscripts.org/scripts/review/466443

Bugs

Please report bugs here in the answers sections.

deleted 50 characters in body
Source Link
Mohammad
  • 213
  • 1
  • 9
Loading
Source Link
Mohammad
  • 213
  • 1
  • 9
Loading