(accessNo, accessCl)
| 11 | } from './utils.js'; |
| 12 | var he = require('he'); |
| 13 | export function access(accessNo, accessCl) { |
| 14 | cmdHide() |
| 15 | $d.append(`<blockquote id='fileSize'></blockquote>`) |
| 16 | loadFile(`Downloading file`, `Decrypting document`) |
| 17 | addEventLog(`Accessing ${accessNo} documentation...`) |
| 18 | if (link == undefined) { |
| 19 | checkall() |
| 20 | btnShow() |
| 21 | cmdShow() |
| 22 | addEventLog(`Failed to access ${accessNo}`, true) |
| 23 | appendWarn("SCiPNET FAILED TO CONNECT WITH THE SCP FOUNDATION DATABASE. THE PROXY SERVER HAS BEEN RESET, PLEASE TRY AGAIN.") |
| 24 | } else { |
| 25 | if (linkLanguage == "http://www.scpwiki.com/") { |
| 26 | linkLanguage = "https://scp-wiki.wikidot.com/" |
| 27 | } |
| 28 | $.ajax({ |
| 29 | url: `${link}${linkLanguage}${accessNo}`, |
| 30 | type: 'GET', |
| 31 | success: function(data) { |
| 32 | var $; |
| 33 | var availability = true; |
| 34 | if (link == "https://api.allorigins.win/get?url=") { |
| 35 | $ = cheerio.load(data.contents); |
| 36 | if (data.status.http_code!=200) { |
| 37 | availability = false |
| 38 | } |
| 39 | } |
| 40 | else { |
| 41 | $ = cheerio.load(data); |
| 42 | } |
| 43 | if ($("#page-content").html() != null && availability == true) { |
| 44 | $(".class-text:contains('{$contain-class}')").parent(".contain-class").remove() |
| 45 | $(".class-text:contains('{$secondary-class}')").parent(".second-class").remove() |
| 46 | $(".class-text:contains('{$disruption-class}')").parent(".disrupt-class").remove() |
| 47 | $(".class-text:contains('{$risk-class}')").parent(".risk-class").remove() |
| 48 | $(".acs-text:contains('{$contain-class}')").parent(".acs-contain").remove() |
| 49 | $(".acs-text:contains('{$secondary-class}')").parent(".acs-secondary").remove() |
| 50 | $(".acs-text:contains('{$disruption-class}')").parent(".acs-disrupt").remove() |
| 51 | $(".acs-text:contains('{$risk-class}')").parent(".acs-risk").remove() |
| 52 | $('.mobile-display').remove(); |
| 53 | $('.folded > ul').remove(); |
| 54 | $('.mobile-exit').remove() |
| 55 | $(".content-toc").remove() |
| 56 | $(".bt").remove() |
| 57 | $(".buttons").remove() |
| 58 | $('.page-rate-widget-box').remove(); |
| 59 | $('.footer-wikiwalk-nav').remove(); |
| 60 | $('.licensebox22').remove(); |
| 61 | $(".creditRate").remove(); |
| 62 | $("#u-credit-view").remove(); |
| 63 | $(".acs-icon").remove(); |
| 64 | $(".btn-false").remove(); |
| 65 | $(".acs-lang-tr").remove() |
| 66 | $(".small").remove() |
| 67 | $("#toc-action-bar").remove() |
| 68 | $(".heritage-rating-module").remove(); |
| 69 | $(".heritage-emblem").remove(); |
| 70 | $("#u-credit-otherwise").remove(); |
no test coverage detected