Skip to content

Commit

Permalink
Support for old makaba engine in 2ch.hk archives
Browse files Browse the repository at this point in the history
  • Loading branch information
SthephanShinkufag committed Jan 20, 2019
1 parent b229afd commit 306d15b
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 107 deletions.
60 changes: 37 additions & 23 deletions Dollchan_Extension_Tools.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 42 additions & 28 deletions extension/Dollchan_Extension_Tools.es6.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 42 additions & 28 deletions src/Dollchan_Extension_Tools.es6.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 41 additions & 27 deletions src/modules/BoardDetector.js
Expand Up @@ -763,6 +763,36 @@ function getImageBoard(checkDomains, checkEngines) {
return { error, postNum };
}
init() {
if($q('section.posts')) {
this.cReply = 'post reply';
this.qBan = '.pomyanem';
this.qFormFile = 'tr input[type="file"]';
this.qFormRules = '.rules-area';
this.qFormTd = 'td';
this.qFormTr = 'tr';
this.qImgInfo = '.file-attr';
this.qOmitted = '.mess-post';
this.qOPost = '.oppost';
this.qPostHeader = '.post-details';
this.qPostMsg = '.post-message';
this.qPostName = '.ananimas, .post-email';
this.qPostRef = '.reflink';
this.qPostSubj = '.post-title';
this.qRPost = '.post.reply[data-num]';
const { css } = this;
Object.defineProperty(this, 'css', {
configurable : true,
get : () => `${ css }
#ABU-alert-wait, .ABU-refmap, .fa-media-icon, .kupi-passcode-suka, .logo + hr,
.media-expand-button, #media-thumbnail, .message-byte-len, .nav-arrows, .norm-reply,
.postform-hr, .postpanel > :not(img), .posts > hr, .reflink::before, .thread-nav,
.toolbar-area { display: none !important; }
${ Cfg.addSageBtn ? `.box[onclick="ToggleSage()"] {
display: none !important; }` : '' }
${ Cfg.imgNames === 2 ? `.filesize { display: inline !important; }
.file-attr { margin-bottom: 1px; }` : '' }`
});
}
$script(`(function() {
function fixGlobalFunc(name) {
Object.defineProperty(window, name,
Expand Down Expand Up @@ -949,40 +979,24 @@ function getImageBoard(checkDomains, checkEngines) {
super(prot, dm);
this._2channel = true;

this.cReply = 'post reply';
this.qBan = '.pomyanem';
this.qFormFile = '.postform__field input[type="file"]';
this.qFormPassw = '#postpasswd';
this.qFormRules = '.rules-area';
this.qFormTd = '.postform__field';
this.qFormTr = '.postform__field';
this.qImgInfo = '.file-attr';
this.qOmitted = '.mess-post';
this.qOPost = '.oppost';
this.qPostHeader = '.post-details';
this.qPostMsg = '.post-message';
this.qPostName = '.ananimas, .post-email';
this.qPostRef = '.reflink';
this.qPostSubj = '.post-title';
this.qRPost = '.post.reply[data-num]';

this.hasAltCaptcha = false;
}
get css() {
return `${ super.css }
#AlertBox, .postform__checkbox.first, .postform__header, .postpanel > :not(img), .posts > hr,
.refmap, #youtube-thumb-float { display: none !important; }
.de-win-open:not(#de-win-cfg) > .de-win-body { background-color: #eee !important; }
#postform { display: inline-table !important; }
${ Cfg.addSageBtn ? '.box[onclick="ToggleSage()"] { display: none !important; }' : '' }
${ Cfg.imgNames === 2 ? `.filesize { display: inline !important; }
.file-attr { margin-bottom: 1px; }` : '' }`;
}
get reportForm() {
return null;
}
init() {
super.init();
this.qFormFile = '.postform__field input[type="file"]';
this.qFormTd = '.postform__field';
this.qFormTr = '.postform__field';
const { css } = this;
Object.defineProperty(this, 'css', {
configurable : true,
get : () => `${ css }
#AlertBox, .postform__checkbox.first, .postform__header, .refmap, #youtube-thumb-float
{ display: none !important; }
.de-win-open:not(#de-win-cfg) > .de-win-body { background-color: #eee !important; }`
});
const el = $id('postform');
if(el) {
el.setAttribute('action', el.getAttribute('action') + '?json=1');
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Wrap.js
Expand Up @@ -6,7 +6,7 @@
'use strict';

const version = '19.1.16.0';
const commit = '883c680';
const commit = 'b229afd';

/* ==[ DefaultCfg.js ]== */
/* ==[ Localization.js ]== */
Expand Down

1 comment on commit 306d15b

@SthephanShinkufag
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5500 commits

Ура!
🍰

Please sign in to comment.