BSCF : sdgardne AR selections.

version 0.9d

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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);