BSCF : sdgardne AR selections.

version 0.9d

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name 		   BSCF : sdgardne AR selections.
// @namespace	   http://supportforums.blackberry.com/t5/
// @description	version 0.9d
// @include		http://supportforums.blackberry.com/t5/notifications/notifymoderatorpage/message-uid/*
// @version 0.0.1.20161201164808
// ==/UserScript==


var MyMacros = [
  "Personal information is displayed"
, "This is spam , or potentially harmful warez"
, "Please lock this thread as it is a duplicate (I have posted a link to the primary thread)."
, "Please:\n1) extract this message into a new discussion\n2) rename it to: XXXXXX\n3) move it to the YYYYYY board.\n4) please move my reply with it"
, "---"
, "Please move this discussion to the appropriate 'Developer' board"
, "Please move this discussion to the BB/Android Device board"
, "Please move this discussion to the BB/Android Hub+ board"
, "---"
, "Please move this discussion to the BB10 smartphone ‘Leap’ board"
, "Please move this discussion to the BB10 smartphone ‘Classic’ board"
, "Please move this discussion to the BB10 smartphone ‘Passport’ board"
, "Please move this discussion to the BB10 smartphone ‘Z30’ board"
, "Please move this discussion to the BB10 smartphone 'Z10’ board"
, "Please move this discussion to the BB10 smartphone 'Z3’ board"
, "Please move this discussion to the BB10 smartphone 'Q10' board"
, "Please move this discussion to the BB10 smartphone 'Q5' board"
, "---"
, "Please move this discussion to the BB10 smartphone ‘Functions and Features’ board"
, "Please move this discussion to the BB10 smartphone ’Desktop Software' board"
, "Please move this discussion to the BB10 smartphone ’Downloaded Applications' board"
, "---"
, "Please move this discussion to the ‘BBM' board"
, "Please move this discussion to the Legacy ’BB OS Smartphones' board"
, "Please move this discussion to the Legacy ’BB PlayBook' board"
];

function insertMacro (i) {
	if (i<= MyMacros.length-1) {
		document.evaluate( "//textarea[@name='additionalInformation']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null ).snapshotItem(0).value = MyMacros[i];
	}
	document.evaluate( "//select[@name='xandrexReportContent']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null ).snapshotItem(0).selectedIndex = 0;
}

var mySelect = document.createElement('select');
	mySelect.setAttribute('name','xandrexReportContent');
	mySelect.addEventListener('click', function(){ insertMacro(this.options[this.selectedIndex].value) } , false);
var OPT = document.createElement('option');
	OPT.setAttribute('value','');
	OPT.appendChild(document.createTextNode('Select...'));
	OPT.setAttribute('selected','selected');
mySelect.appendChild(OPT);
for ( var i = 0 ; i< MyMacros.length ; i++) {
	var OPT = document.createElement('option');
		OPT.value = i;
		OPT.appendChild(document.createTextNode(MyMacros[i]));
	mySelect.appendChild(OPT);
}
document.getElementsByTagName('fieldset')[0].appendChild(mySelect);