maxurl
1.0.0
영어 | 포르투갈어 (브라질)
Image Max URL은 일반적으로 URL 패턴을 대체하여 더 큰/독창적 인 버전의 이미지 및 비디오를 찾는 프로그램입니다.
현재> 9000 개의 하드 코딩 된 웹 사이트 (Sites.txt의 전체 목록)에 대한 지원이 포함되어 있지만 여러 일반 엔진 (예 : WordPress 및 MediaWiki)을 지원하므로 다른 많은 웹 사이트에서도 작동 할 수 있습니다.
현재 다음과 같이 출시되었습니다.
지역 사회:
#image-max-url:tedomum.net )확장은 현재 다른 브라우저의 Addon Stores (예 : Chrome 및 Microsoft Edge)와 사용할 수 없지만 사용자 스크립트 대신 확장 버전을 사용하려면이 저장소를 부재 할 수 있습니다.
모든 기여는 대단히 감사합니다! 지원하려는 버그 보고서, 기능 요청 또는 새 웹 사이트가 있으면 여기에 문제를 제기하십시오.
GitHub 계정이없는 경우 위의 커뮤니티 링크 중 하나를 사용하거나 저에게 직접 연락하십시오.
저장소 자체 (코드 기여, 번역 등)에 기여하려면 Contributing.md를 확인하십시오.
위에서 언급했듯이 userscript.user.js도 노드 모듈로 기능합니다.
var maximage = require ( './userscript.user.js' ) ;
maximage ( smallimage , {
// If set to false, it will return only the URL if there aren't any special properties
// Recommended to keep true.
//
// The only reason this option exists is as a small hack for a helper userscript used to find new rules,
// to check if IMU already supports a rule.
fill_object : true ,
// Maximum amount of times it should be run.
// Recommended to be at least 5.
iterations : 200 ,
// Whether or not to store to, and use an internal cache for URLs.
// Set this to "read" if you want to use the cache without storing results to it.
use_cache : true ,
// Timeout (in seconds) for cache entries in the URL cache
urlcache_time : 60 * 60 ,
// List of "problems" (such as watermarks or possibly broken image) to exclude.
//
// By default, all problems are excluded.
// You can access the excluded problems through maximage.default_options.exclude_problems
// By setting it to [], no problems will be excluded.
//exclude_problems: [],
// Whether or not to exclude videos
exclude_videos : false ,
// This will include a "history" of objects found through iterations.
// Disabling this will only keep the objects found through the last successful iteration.
include_pastobjs : true ,
// This will try to find the original page for an image, even if it requires extra requests.
force_page : false ,
// This allows rules that use 3rd-party websites to find larger images
allow_thirdparty : false ,
// This is useful for implementing a blacklist or whitelist.
// If unspecified, it accepts all URLs.
filter : function ( url ) {
return true ;
} ,
// Helper function to perform HTTP requests, used for sites like Flickr
// The API is expected to be like GM_xmlHTTPRequest's API.
// An implementation using node's request module can be found in reddit-bot/dourl.js
do_request : function ( options ) {
// options = {
// url: "",
// method: "GET",
// data: "", // for method: "POST"
// overrideMimeType: "", // used to decode alternate charsets
// headers: {}, // If a header is null or "", don't include that header
// onload: function(resp) {
// // resp is expected to be XMLHttpRequest-like object, implementing these fields:
// // finalUrl
// // readyState
// // responseText
// // status
// }
// }
} ,
// Callback
cb : function ( result ) {
if ( ! result )
return ;
if ( result . length === 1 && result [ 0 ] . url === smallimage ) {
// No larger image was found
return ;
}
for ( var i = 0 ; i < result . length ; i ++ ) {
// Do something with the object
}
}
} ) ;결과는 반환 된 이미지를 사용하는 데 유용 할 수있는 속성이 포함 된 객체 목록입니다.
[ {
// The URL of the image
url : null ,
// Whether or not this URL is a video
video : false ,
// Whether it's expected that it will always work or not.
// Don't rely on this value if you don't have to
always_ok : false ,
// Whether or not the URL is likely to work.
likely_broken : false ,
// Whether or not the server supports a HEAD request.
can_head : true ,
// HEAD errors that can be ignored
head_ok_errors : [ ] ,
// Whether or not the server might return the wrong Content-Type header in the HEAD request
head_wrong_contenttype : false ,
// Whether or not the server might return the wrong Content-Length header in the HEAD request
head_wrong_contentlength : false ,
// This is used in the return value of the exported function.
// If you're using a callback (as shown in the code example above),
// this value will always be false
waiting : false ,
// Whether or not the returned URL is expected to redirect to another URL
redirects : false ,
// Whether or not the URL is temporary/only works on the current IP (such as a generated download link)
is_private : false ,
// Whether or not the URL is expected to be the original image stored on the website's servers.
is_original : false ,
// If this is true, you shouldn't input this URL again into IMU.
norecurse : false ,
// Whether or not this URL should be used.
// If true, treat this like a 404
// If "mask", this image is an overlayed mask
bad : false ,
// Same as above, but contains a list of objects, e.g.:
// [{
// headers: {"Content-Length": "1000"},
// status: 301
// }]
// If one of the objects matches the response, it's a bad image.
// You can use maximage.check_bad_if(bad_if, resp) to check.
// (resp is expected to be an XHR-like object)
bad_if : [ ] ,
// Whether or not this URL is a "fake" URL that was used internally (i.e. if true, don't use this)
fake : false ,
// Headers required to view the returned URL
// If a header is null, don't include that header.
headers : { } ,
// Additional properties that could be useful
extra : {
// The original page where this image was hosted
page : null ,
// The title/caption attached to the image
caption : null
} ,
// If set, this is a more descriptive filename for the image
filename : "" ,
// A list of problems with this image. Use exclude_problems to exclude images with specific problems
problems : {
// If true, the image is likely larger than the one inputted, but it also has a watermark (when the inputted one doesn't)
watermark : false ,
// If true, the image is likely smaller than the one inputted, but it has no watermark
smaller : false ,
// If true, the image might be entirely different from the one inputted
possibly_different : false ,
// If true, the image might be broken (such as GIFs on Tumblr)
possibly_broken : false
}
} ]