Save & Search Quiz By Pak Defndr

The userscript helps you to search your quiz instantly and save your quiz question in text file.No need to see copy paste enable on internet..

当前为 2017-01-23 提交的版本,查看 最新版本

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

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

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

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

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

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Save & Search Quiz By Pak Defndr
// @namespace    https://greasyfork.org/en/scripts/26476-copy-paste-bypasser
// @author       Pak Defndr
// @version      1.0.1
// @copyright    2017+, Pakdefndr
// @description  The userscript helps you to search your quiz instantly and save your quiz question in text file.No need to see copy paste enable on internet..
// @run-at       document-start
// @include      http://quiz.vu.edu.pk/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function () {
    var a = document.createElement('a');
a.setAttribute('href','#');
a.setAttribute('target','_blank');
a.setAttribute('class','btn');
a.setAttribute('id','a');
a.setAttribute('style','margin-right:3px;');
a.innerHTML = 'Save to Disk';
// apend the anchor to the body
// of course you can append it almost to any other dom element
document.getElementsByTagName('td')[0].appendChild(a);
//document.getElementsByTagName('table')[0].innerHTML += '<a href="#">Hello</a>';
var b = document.createElement('a');
textbox0 = document.getElementById('txtQuestion');
b.setAttribute('href','https://www.google.com.pk/search?q='+'"'+textbox0.value+'"');
b.setAttribute('target','_blank');
b.setAttribute('class','btn btn');
b.innerHTML = 'Search In Google';
// apend the anchor to the body
// of course you can append it almost to any other dom element
document.getElementsByTagName('td')[0].appendChild(b);
function download(text, name, type) {
  var a = document.getElementById("a");
   text = text.replace(/\n/g, "\r\n");
  var file = new Blob([text], {type: type});
  a.href = URL.createObjectURL(file);
  a.download = name;
}
    filename = document.getElementById('lblRemainingQs').innerHTML;
    SubjectC = document.getElementById('lblCourseCode').innerHTML;
    textbox0 = document.getElementById('txtQuestion');
    textbox1 = document.getElementById('lblAnswer0');
    textbox2 = document.getElementById('lblAnswer1');
    textbox3 = document.getElementById('lblAnswer2');
    textbox4 = document.getElementById('lblAnswer3');
    textbox = SubjectC+"\n"+"Question No."+filename+"\r\n"+textbox0.value+"\r\n"+textbox1.value+"\n"+textbox2.value+"\n"+textbox3.value+"\n"+textbox4.value+"\n"+"\r\n"+">>>>>>Made By Pak Defndr<<<<<<<<<";
    download(textbox, 'Question_'+filename+'.txt', 'text/plain');
})();