{"id":5765,"date":"2013-08-19T22:19:53","date_gmt":"2013-08-19T13:19:53","guid":{"rendered":"http:\/\/rentan.org\/blog\/?p=5765"},"modified":"2016-02-12T23:55:57","modified_gmt":"2016-02-12T14:55:57","slug":"proxomitron-anti-check-copy-contents","status":"publish","type":"post","link":"https:\/\/rentan.org\/blog\/2013\/08\/19\/proxomitron-anti-check-copy-contents\/","title":{"rendered":"Proxomitron: \u30d6\u30e9\u30a6\u30b6\u3067\u306e\u30b3\u30d4\u30fc\u64cd\u4f5c\u3092\u76e3\u8996\u3059\u308b\u30b9\u30d1\u30a4\u30a6\u30a7\u30a2\u304b\u3089\u306e\u9632\u5fa1"},"content":{"rendered":"<p><a href=\"http:\/\/www.kigurumi.asia\/imake\/2548\/\">WordPress\uff1a\u8ab0\u304b\u304c\u8a18\u4e8b\u3092\u30b3\u30d4\u30fc\u3057\u305f\u3089\u6559\u3048\u3066\u304f\u308c\u308b\u30d7\u30e9\u30b0\u30a4\u30f3CCC(Check Copy Contents)\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002 | \u7740\u3050\u308b\u307f\u8ffd\u3044\u5265\u304e\u30da\u30f3\u30ae\u30f3<\/a><\/p>\n<blockquote><p>\u8ab0\u304b\u304c\u3001\u3042\u306a\u305f\u306e\u30d6\u30ed\u30b0\u306e\u6587\u7ae0\u3092\u30b3\u30d4\u30fc\u3057\u305f\u3089\u3001\u305d\u306e\u30b3\u30d4\u30fc\u3055\u308c\u305f\u7b87\u6240\u3068\u30da\u30fc\u30b8\u306eURL\u3092\u3001\u3053\u3063\u305d\u308a\u3068\u3042\u306a\u305f\u306b\u30e1\u30fc\u30eb\u3067\u901a\u77e5\u3057\u307e\u3059\u3002<\/p><\/blockquote>\n<p>(\u30ea\u30f3\u30af\u5148\u3088\u308a\u5f15\u7528)<\/p>\n<p>\u3068\u3044\u3046\u6050\u308d\u3057\u3044 WordPress \u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3042\u308a\u307e\u3057\u3066\u3001\u305d\u308c\u306b\u5bfe\u3059\u308b\u9632\u5fa1\u7b56\u306e\u5b9f\u9a13\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b &lt;script&gt; \u30bf\u30b0\u3092\u30da\u30fc\u30b8\u306b\u633f\u5165\u3059\u308b\u3053\u3068\u3067\u3001copy \u30a4\u30d9\u30f3\u30c8\u304b\u3089 <code>window.getSelection()<\/code> \u3084 <code>document.selection.createRange()<\/code> \u304c\u547c\u3070\u308c\u305f\u5834\u5408\u306b\u8b66\u544a\u3092\u8868\u793a\u3057\u3066\u3001\u30c0\u30df\u30fc\u306e\u30c7\u30fc\u30bf(\u300c\u8f1d\u3051\u300d)\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"prog_code javascript\">\r\n<code>  function hook (obj, name, func) {\r\n    var orig = obj [name];\r\n\r\n    var k = '__prox_' + name;\r\n    if (!obj [k]) {\r\n      obj [k] = orig;\r\n    }\r\n\r\n    obj [name] = func;\r\n    return orig;\r\n  }\r\n\r\n  function hookSelection () {\r\n    function msg (s) {\r\n      alert (location.href + '\\n\\n' + s + ' is called from oncopy event.');\r\n    }\r\n\r\n    if (window.getSelection) {\r\n      hook (window, 'getSelection', function () {\r\n\tif (<ins style=\"color:red\">!window.event || <\/ins>window.event.type !== 'copy') {\r\n          return window.__prox_getSelection ();\r\n\t}\r\n\tmsg ('window.getSelection');\r\n\r\n\tvar sel = {\r\n          anchorNode: null,\r\n          anchorOffset: 0,\r\n          focusNode: null,\r\n          focusOffset: 0,\r\n          toString: function () { return 'Shine'; }\r\n\t};\r\n\treturn sel;\r\n      });\r\n    }\r\n\r\n    if (document.selection.createRange) {\r\n      hook (document.selection, 'createRange', function () {\r\n\tif (<ins style=\"color:red\">!window.event || <\/ins>window.event.type !== 'copy') {\r\n          return document.selection.__prox_createRange ();\r\n\t}\r\n\tmsg ('document.selection.createRange');\r\n\r\n\tvar rng = {\r\n          setStart: function () { },\r\n          setEnd: function () { },\r\n          cloneContents: function () { return document.createTextNode ('Shine'); },\r\n          text: 'Shine',\r\n          htmlText: 'Shine',\r\n          toString: function () { return 'Shine'; }\r\n\t};\r\n\treturn rng;\r\n      });\r\n    }\r\n  }\r\n  hookSelection ();<\/code>\r\n<\/pre>\n<p>\u554f\u984c\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u73fe\u72b6\u306e\u30b3\u30fc\u30c9\u304c\u30c0\u30df\u30fc\u306e\u30c7\u30fc\u30bf\u3092\u6d88\u5316\u3067\u304d\u308b\u7a0b\u5ea6\u306b\u507d\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u7528\u610f\u3057\u3066\u3042\u308a\u307e\u3059\u304c\u3001\u30c0\u30df\u30fc\u3092\u8fd4\u3059\u4ee3\u308f\u308a\u306b\u554f\u7b54\u7121\u7528\u3067\u4f8b\u5916\u3092\u6295\u3052\u3061\u3083\u3063\u3066\u3082\u3044\u3044\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u3042\u3068 <code>document.getSelection()<\/code> \u3082\u6f70\u3057\u305f\u65b9\u304c\u3044\u3044\u304b\u3082\u3002<\/p>\n<p>copy \u30a4\u30d9\u30f3\u30c8\u4ee5\u5916\u3067\u306e\u76e3\u8996\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u4f8b\u3048\u3070 <code>window.setInterval()<\/code> \u3067\u76e3\u8996\u3001\u306a\u3069\u9632\u5fa1\u7b56\u306b\u5bfe\u3059\u308b\u5bfe\u6297\u63aa\u7f6e\u304c\u53d6\u3089\u308c\u308b\u3068\u5bfe\u5fdc\u304c\u96e3\u3057\u3044\u3067\u3059\u3002\u30b9\u30d1\u30a4\u76ee\u7684\u3067\u306f\u306a\u304f\u52d5\u7684\u306a\u30a6\u30a7\u30d6\u8868\u73fe\u306e\u305f\u3081\u306b\u9078\u629e\u7bc4\u56f2\u306e\u53d6\u5f97\u3092\u884c\u3046\u30da\u30fc\u30b8\u3082\u3042\u308b\u306e\u3067\u3001\u5168\u3066\u3092\u30d6\u30ed\u30c3\u30af\u3059\u308b\u3068\u3044\u3046\u8a33\u306b\u3082\u3044\u304b\u306a\u3044\u3068\u601d\u3046\u306e\u3067\u3002<\/p>\n<p>\u3053\u3093\u306a\u9762\u5012\u306a\u65b9\u6cd5\u3067\u306f\u306a\u304f\u3066\u3001\u5358\u306b\u30d6\u30ed\u30c3\u30af\u30ea\u30b9\u30c8\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8ffd\u52a0\u3059\u308b\u624b\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u30d1\u30b9\u540d\u3092\u5909\u66f4\u3055\u308c\u308b\u3068\u30d6\u30ed\u30c3\u30af\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre>\r\n<code>*\/wp-content\/plugins\/check-copy-contentsccc\/<\/code>\r\n<\/pre>\n<p>\u30d6\u30ed\u30c3\u30af\u30ea\u30b9\u30c8\u306b\u304a\u3044\u3066 <code>*<\/code> \u304b\u3089\u59cb\u307e\u308b URL \u3060\u3068\u30cf\u30c3\u30b7\u30e5\u5316\u3055\u308c\u306a\u3044\u3001\u3068\u3044\u3046\u306e\u3082\u30de\u30a4\u30ca\u30b9\u30dd\u30a4\u30f3\u30c8\u3002<\/p>\n<p><span class=\"psts\">2016-02-12<\/span> \u30a4\u30d9\u30f3\u30c8\u5916\u304b\u3089\u547c\u3073\u51fa\u3055\u308c\u308b\u3068 <code>window.event<\/code> \u304c <code>null<\/code> \u306e\u305f\u3081\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u4fee\u6b63\u3057\u307e\u3057\u305f\uff08\u8d64\u5b57\u90e8\u5206\uff09\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\uff1a\u8ab0\u304b\u304c\u8a18\u4e8b\u3092\u30b3\u30d4\u30fc\u3057\u305f\u3089\u6559\u3048\u3066\u304f\u308c\u308b\u30d7\u30e9\u30b0\u30a4\u30f3CCC(Check Copy Contents)\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002 | \u7740\u3050\u308b\u307f\u8ffd\u3044\u5265\u304e\u30da\u30f3\u30ae\u30f3 \u8ab0\u304b\u304c\u3001\u3042\u306a\u305f\u306e\u30d6\u30ed\u30b0\u306e\u6587\u7ae0\u3092\u30b3\u30d4\u30fc\u3057\u305f\u3089\u3001\u305d\u306e\u30b3\u30d4\u30fc\u3055\u308c\u305f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-5765","post","type-post","status-publish","format-standard","hentry","category-proxomitron"],"_links":{"self":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/5765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/comments?post=5765"}],"version-history":[{"count":5,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/5765\/revisions"}],"predecessor-version":[{"id":7105,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/5765\/revisions\/7105"}],"wp:attachment":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/media?parent=5765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/categories?post=5765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/tags?post=5765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}