Angies_List_Al_Tool_Plugin 1.0

Feng Guan 对Angie's List AL Tool的BPO用户录入操作进行智能优化

目前为 2016-04-07 提交的版本。查看 最新版本

// ==UserScript==
// @version        2016.04.07
// @name           Angies_List_Al_Tool_Plugin 1.0
// @namespace     AngiesListAlToolPlugin
// @author	      fengguan.ld~gmail。com
// @description    Feng Guan 对Angie's List AL Tool的BPO用户录入操作进行智能优化
// @include        https://altools.angieslist.com/Member/*
//在这写点什么备注信息呢?我还没想好!
// @encoding       utf-8
// @grant          unsafeWindow
// grant          GM_openInTab
// ==/UserScript==

$(function(){
	//每次刷新页面后都会添加plugbox
	if ($("#plugbox").length==0){ 
		$("#main").before('<p id="plugbox" class="info" style="width: 200px;height: 220px;position: fixed;color:royalblue;bottom: 0px;">小叮当来帮忙O(∩_∩)O :<br/><span id="plugmsg"></span></p>');
	} 
	
	//到达Add a Review界面会自动点Service Provider按钮
	if ($("input[ID$='Step2Goto3']").length>0){ 
		$("input[ID$='Step2Goto3']").click();
		//$.cookie('RobotMsg', "."); 
		$("#plugmsg").html("不要捉急,我已帮你猛点按钮穿越到下个页面啦");
	} 
	

	/**********************************************************************************************************/
	//以下是ADD A REVIEW页面的优化动作
	/**********************************************************************************************************/
	if($('select[ID$="ReportOriginDropDown"]')){
		$("#plugmsg").html("<br/>1.变大categories的checkbox.<br/>2.我把Survey评分全都选A啦<br/>3.自动勾选Agree checkbox啦 <br/>4.Review Origin自动选则MAIL - REVIEW PDF啦<br/>5.把俩个评论框瘦身后排排坐啦<br/><br/>* 需要其他帮助请找Feng Guan");
	}
	
	//增大categories的checkbox尺寸
	$('table.cblist [type=checkbox]').attr("style","width:16px;height:16px;").click(function(){
		if($(this).is(':checked')){
			$(this).next().addClass("table-cell-left");
		}
		else{			
			$(this).next().removeClass("table-cell-left");
		}
	});
	//如果一行里已经选了radio就不再替他选第一个radio了,但是实际测试,发现刷新页面后现有表单内容不保留,全部重置,radio全部变为未选中,所以这个判断暂时是多余的
	if($('table[ID$="GradableRadio"]').find("input[type=radio]:checked").length==0){ 
		$('table[ID$="GradableRadio"]').find("td:first").find("input[type=radio]").click();
		//$("#plugmsg").html($("#plugmsg").text()+" Survey评分全都选A啦.");
	}

	//自动选中more information的I confirm that the information contained in this Service Evaluation
	$(":checkbox[ID$=RptIAgree]").attr("checked","checked");
	
	//Review Origin: 下拉,默认选中MAIL - REVIEW PDF选项,此项的VALUE=49
	$('select[ID$="ReportOriginDropDown"]').find("option[value=49]").attr("selected","selected");
	
	//对俩评论文本框重新摆放,一左一右,因为原来一上一下的太费空间	
	$("span[ID$=WorkDescLabel]").parent().wrap('<td id="tdWorkDescLabel" valign="top" style="height:200px;"></td>');
	$("span[ID$=CommentLabel]").parent().wrap('<td id="tdCommentLabel" valign="top" style="height:200px;"></td>');
	$("#tdWorkDescLabel").wrap('<table><tr id="trCommentLabel"></tr></table>');
	$("#tdCommentLabel").insertAfter("#tdWorkDescLabel").find("br").remove();	
	//对俩评论文本框进行宽高瘦身
	$("div[ID$=ReportTextWorkDescriptionRadEditor]").css({"height":"250px","min-height":"220px","width":"450px"});
	$("table[ID$=ReportTextWorkDescriptionRadEditorWrapper]").css("height","120px");
	$("div[ID$=ReportTextCommentsRadEditor]").css({"height":"250px","min-height":"220px","width":"450px"});
	$("table[ID$=ReportTextCommentsRadEditorWrapper]").css("height","220px");
	$("span.exceptionlanguage").hide();
	$("span.exceptionlanguage").parent().attr("style",""); //You have 10000 characters remaining.取消居右显示
	
	//这个SPAN的文字太长,挤到右边的评论框,缩减文件,增加提示
	$("span[ID$=WorkDescLabel]").text("Please describe the reason for your appointment(10000 char remaining)").attr("title","Please describe the reason for your appointment, your interaction with the provider, and any treatment outcomes.");
	$("span[ID$=CommentLabel]").text("How'd it go? We want all the details.(10000 char remaining)");
	
	/**********************************************************************************************************/
	//以下是Add Notes页面的优化动作
	/**********************************************************************************************************/
	if($("textarea[ID$=AddNoteTextBox]")){
		$("#plugmsg").html("<br/>1. MAIN已经选好DATA TEAM啦!<br/>2. SUB里面打酱油的家伙们去火星了,勿念!<br/>3. 换行排版神马的最费指甲了,点一下就帮你搞定啦!<br/>* 需要其他帮助请找Feng Guan");
	}
	
	$("#charRemainingDiv").click(function(){
		var str2=$("textarea[ID$=AddNoteTextBox]").val();
		alert(str2);
		$("span[id$=RecentNotes]").text(str2);
	});
	
	$("textarea[ID$=AddNoteTextBox]").click(function(){			
		var txtnote=$.trim($("textarea[ID$=AddNoteTextBox]").val());
		txtnote = txtnote.replace(/[\r\n]/g," ")//去掉回车换行 
		if(txtnote!="" && txtnote.substr(0,23)!="Entered paper review on"){
			txtnote="Entered paper review on "+ txtnote;
		}			
		var juhao=txtnote.substr(txtnote.length-1,1);
		if(txtnote!="" && juhao!="."){
			txtnote=txtnote+".";
		}
		while (txtnote.indexOf("  ")>0)
	   {
			txtnote=txtnote.replace("  "," ");
	   }
		
		$("textarea[ID$=AddNoteTextBox]").val(txtnote);
	});

	

});

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址