Non-free Javascripts on V2EX

2015-11-18 12:18:11 +08:00
 GNiux
Free Software 狂热者来了,哇卡卡:)

from LibreJS:


List of accepted JavaScript in https://v2ex.com/mission/daily

This script has been tagged as free software by LibreJS authors.
https://cdn.v2ex.com/static/js/jquery.js

List of blocked JavaScript in https://v2ex.com/mission/daily

Whitelist

NONTRIVIAL: an open method similar to xhr.open is used

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-11940834-2', 'v2ex.com');
ga('send', 'pageview');



Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onsubmit","value":"return dispatch()"}]

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onclick","value":"if (confirm('确定要从 V2EX 登出?')) { location.href= '/signout?once=46830'; }"}]

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onclick","value":"recordOutboundLink(this, 'Outbound Links', '100offer.com');"}]

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onclick","value":"location.href = '/mission/daily/redeem?once=46830';"}]

Whitelisterror parsing: ReferenceError: type is not defined
https://cdn.v2ex.com/static/js/jquery-ui.js
Whitelisterror parsing: ReferenceError: type is not defined
https://cdn.v2ex.com/static/js/jquery.autosize.js?v=1.18.9
Whitelisterror parsing: ReferenceError: type is not defined
https://v2ex.com/static/js/v2ex.js?v=86867cfb3f3a9d584205ca2ee1a940ab
Whitelisterror parsing: ReferenceError: type is not defined
https://v2ex.com/static/js/select2/select2.min.js
Whitelisterror parsing: ReferenceError: type is not defined
https://v2ex.com/static/js/selectboxit/selectboxit.min.js
Whitelisterror parsing: ReferenceError: type is not defined
https://v2ex.com/static/js/jquery.textcomplete.min.js?v=43bfb325d9b6b784e680aa9eaef91925


List of blocked JavaScript in https://v2ex.com/go/feedback

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts

$(function(){
protectTraffic();
$('#topic_content').autosize().blur();
});


Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts

blocked = [];
ignored_topics = [];
$("#TopicsNode").children('.cell').each( function(index) {
for (i in blocked) {
if ($(this).hasClass('from_' + blocked[i])) {
$(this).css('display', 'none');
}
}
for (i in ignored_topics) {
if ($(this).hasClass('t_' + ignored_topics[i])) {
$(this).css('display', 'none');
}
}
});


Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts

$("#topic_content").keydown(function(e) {
if ((e.ctrlKey || e.metaKey) && e.which === 13) {
e.preventDefault();
$("#topic_content").parent().submit();
}
});
$("#topic_title").keydown(function(e) {
if ((e.ctrlKey || e.metaKey) && e.which === 13) {
e.preventDefault();
$("#topic_title").parent().submit();
}
});


Whitelist

NONTRIVIAL: an open method similar to xhr.open is used

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-11940834-2', 'v2ex.com');
ga('send', 'pageview');



Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onsubmit","value":"return dispatch()"}]

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onclick","value":"if (confirm('确定要从 V2EX 登出?')) { location.href= '/signout?once=20305'; }"}]

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onclick","value":"recordOutboundLink(this, 'Outbound Links', '100offer.com');"}]

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onclick","value":"location.href = '/new/feedback';"}]

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
[{"attribute":"onclick","value":"location.href = '/go/feedback?p=2';"}]

Whitelisterror parsing: ReferenceError: type is not defined
https://cdn.v2ex.com/static/js/jquery-ui.js
Whitelisterror parsing: ReferenceError: type is not defined
https://cdn.v2ex.com/static/js/jquery.autosize.js?v=1.18.9
Whitelisterror parsing: ReferenceError: type is not defined
https://v2ex.com/static/js/v2ex.js?v=86867cfb3f3a9d584205ca2ee1a940ab
Whitelisterror parsing: ReferenceError: type is not defined
https://v2ex.com/static/js/select2/select2.min.js
Whitelisterror parsing: ReferenceError: type is not defined
https://v2ex.com/static/js/selectboxit/selectboxit.min.js
Whitelisterror parsing: ReferenceError: type is not defined
https://v2ex.com/static/js/jquery.textcomplete.min.js?v=43bfb325d9b6b784e680aa9eaef91925
2379 次点击
所在节点    反馈
4 条回复
oott123
2015-11-18 13:40:37 +08:00
能告诉我这说明了什么吗…
看上去像是扫描器生成的结果直接复制粘贴了,这样真的好吗?
GNiux
2015-11-18 22:06:55 +08:00
@oott123
谢谢你的提问。对,我只是从一个叫“ LibreJS"的插件中截获贵网站上每个页面传给我的 javascripts ,有的(大部分) js 是不让客户端用者看到 js 具体是什么内容(源码)。

不让使用者知情那些 js 到底做了什么,这样,真的好吗?
oott123
2015-11-18 22:27:32 +08:00
@GNiux 我不明白什么叫「不让客户端用者看到 js 具体是什么内容(源码)。 」
如果你指压缩、混淆,那这是节约网络流量的一种方式。

另外,如果你在意每个 js 都做了什么,你可以启用 NoScript 。我认为绝大多数使用者并不需要理解这些,我也不认为网站的作者有义务告知用户。
GNiux
2015-11-19 16:29:15 +08:00
1. 我明白“是节约网络流量的一种方式”,但这是在回答我的问题?

2. 为什么要因噎废食?

3. 对不起,打扰你了。可是……“认为绝大多数使用者并不需要理解这些”的判断理据是?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/237010

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX