-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Max Base
committed
Jun 22, 2019
1 parent
99301fc
commit d9ad0d2
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/** | ||
* | ||
* @Name : PlaneTicketFirefox/main.js | ||
* @Version : 1.0 | ||
* @Programmer : Max | ||
* @Date : 2019-06-23 | ||
* @Released under : https://github.com/BaseMax/PlaneTicketFirefox/blob/master/LICENSE | ||
* @Repository : https://github.com/BaseMax/PlaneTicketFirefox | ||
* | ||
**/ | ||
document.body.style.border = "25px solid yellow"; | ||
let lb=document.querySelectorAll("table tr td input[readonly=readonly]"); | ||
console.log(lb[0].value); | ||
console.log(lb[1].value); | ||
let code=document.querySelector("body").innerHTML; | ||
let matches = code.match(/مسير: \<b\>([^<]*) به ([^<]*)\<\/b\>/); | ||
// console.log(matches); | ||
if(matches) { | ||
console.log(matches[1]); | ||
console.log(matches[2]); | ||
} | ||
let matches = code.match(/تاريخ: <b>\s*([^<]*)\<\/b\>/); | ||
// console.log(matches); | ||
if(matches) { | ||
console.log(matches[1]); | ||
} | ||
let matches = code.match(/خروج:\s*([^\n]*)/); | ||
// console.log(matches); | ||
if(matches) { | ||
console.log(matches[1]); | ||
} | ||
let matches = code.match(/ورود:\s*([^\n]*)/); | ||
// console.log(matches); | ||
if(matches) { | ||
console.log(matches[1]); | ||
} | ||
let matches = code.match(/ماره پرواز:\s*([^\n]*)/); | ||
// console.log(matches); | ||
if(matches) { | ||
console.log(matches[1]); | ||
} | ||
let matches = code.match(/قابل پرداخت\s*\<\/td\>\s*\<td style\=\"text-align: right; font-weight: bold;\"\>\s*([^\n]*)/); | ||
// console.log(matches); | ||
if(matches) { | ||
console.log(matches[1]); | ||
} | ||
let lb=document.querySelectorAll("table.Table01 tr"); | ||
// console.log(lb); | ||
for(let index=4; index<lb.length;index++) { | ||
let content=lb[index].innerHTML; | ||
if(content.includes('<table class="Table02" border="0">')) { | ||
break; | ||
} | ||
// console.log(lb[index]); | ||
let matches = content.match(/\<td\>\s*\<span[^\>]+\>([^\<]*)\<\/span\>\s*\<\/td\>\s*\<td\>\s*([^\n]*)\s*\<\/td\>\s*\<td\>\s*([^\n]*)\s*\<\/td\>\s*\<td\>\s*([^\n]*)\s*\<\/td\>/); | ||
// console.log(matches); | ||
if(matches) { | ||
console.log(matches[1]); | ||
console.log(matches[2]); | ||
console.log(matches[3]); | ||
console.log(matches[4]); | ||
} | ||
} |