Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Added GPLv2 to the comments about licenses. #48

merged 1 commit into from

5 participants


All the code comments about the license only show the MIT option. This is just a small change to add "/GPLv2" to all of those comments.


Thanks. Hmm. I hadn't realized I'd referenced GPL in the readme. MIT seems plenty permissible and clear enough. Any conflicts with simply sticking with MIT and removing the reference to GPL in the comment?


MIT is great for allowing others to use your script on their website. However, if a project is GPL, it can only include code that is "GPL compatible". And unfortunately, the MIT license is not compatible. That's why many projects are dual-licensed MIT + GPL.

The HTML5 shim just went dual-licensed a couple months ago to allow it to be included with Drupal.

I was about to include respond.js with Drupal's Zen theme.

Since you didn't realize respond.js was already GPL, can I formerly request you dual license the script? :-)

@scottjehl scottjehl merged commit 11cf02e into from

It is the majority opinion that dual licensing with something permissable (MIT) and something more restrictive (GPL) is unnecessary in most cases. Check out:

MIT is "GPL-compatible", which means that MIT code can easily be included in GPL projects without any issues. Moreover, MIT explicitly grants permission to "sublicense", which seems to indicate that MIT code can in fact be re-licensed as GPL.

If code is already GPL, it can benefit from having a dual-license of MIT added, for projects which cannot (for whatever reason) include GPL code. The reverse though is not true. If code is already MIT, then there's basically no benefit to explicitly dual-licensing it to GPL, because MIT is already permissive enough that the code in question can be treated like GPL without the explicit licensing as such.

Yes, many projects do dual-license as MIT and GPL. Just because they do that doesn't mean it's necessary or a good idea. I've asked about why jQuery did it, for instance, and was told it was more a political move than legal one.

NOW, on the topic of Drupal and their code repo... I happen to have just been dealing with this question recently. I found:

There, it seems clear that the question of licensing is actually separate from the question of if Drupal wants to allow third-party code to be included in their repo. They said specifically in that thread that MIT was GPL compatible. But they also said that regardless of the license question, the admins of the repo would have to make an exception to include a third-party piece of code (whether that code was MIT or GPL was orthagonal).

This means that in Drupal's case, the inclusion of MIT code is a 2-part question, where the second part is not about licensing but about Drupal policy. Drupal policy in this case is more restrictive than either the MIT or GPL is, because Drupal policy states that (unless excepted), third-party code that is MIT should be kept separate rather than included. But I read that thread to say that even if the third party code WERE dual-licensed and thus available as GPL, that same policy would still be in effect.

I think it's a bad idea to change the licensing scheme of a project without good cause. There doesn't seem to be any good or legally defendable cause for why dual licensing MIT and GPL is useful (except for the political view of such a move). And dual licensing just so Drupal will include your code is, in general, a bad idea, because to be included as third-party code, you have to get an exception anyway, and once you get an exception from the repo admins, the license is an irrelevant issue.


My experiences have been different, and I've had to explicitly list GPL or LGPL alongside MIT in order to satisfy requirements that my code be explicitly GPL licensed. Perhaps the tenor has changed, but that is the reason I had to re-license QueryPath from MIT to "MIT or GPL" and then explicitly list the version in Drupal's repo as "GPL".

From the purely pragmatic perspective, I don't see why this is a problem. The dual license satisfies those who have a licensing agenda, and yet still makes things maximally redistributable for me.


Just to be clear, the hosting policy is that everything within hosted git is GPL v2+. That means if a MIT licensed library is included in git it is then redistributed from there as GPL v2+. You can see this at

With libraries that are licensed under MIT, BSD, and others this re-licensing is fine. But, it's a nice courtesy to work with the library owner to get their permission and work it well with them before doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 21, 2011
  1. @JohnAlbin
This page is out of date. Refresh to see the latest.
2  cross-domain/respond-proxy.html
@@ -1,4 +1,4 @@
-<!-- Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT Lic. -->
+<!-- Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. -->
<!DOCTYPE html>
2  cross-domain/respond.proxy.js
@@ -1,4 +1,4 @@
-/*! Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT Lic. */
+/*! Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. */
(function(win, doc, undefined){
var docElem = doc.documentElement,
proxyURL = doc.getElementById("respond-proxy").href,
2  respond.min.js
@@ -1,2 +1,2 @@
-/*! Respond.js: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. */
+/*! Respond.js: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. */
(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length,z=0,y,x,A,v;for(;z<w;z++){y=B[z],x=y.href,,v=y.rel&&y.rel.toLowerCase()==="stylesheet";if(!!x&&v&&!o[x]){if(y.styleSheet.rawCssText){m(y.styleSheet.rawCssText,x,A);o[x]=true}else{if(!/^([a-zA-Z]+?:(\/\/)?)/.test(x)||x.replace(RegExp.$1,"").split("/")[0]{d.push({href:x,media:A})}}}}t()},t=function(){if(d.length){var v=d.shift();n(v.href,function(w){m(w,v.href,;o[v.href]=true;t()})}},m=function(G,v,x){var E=G.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),H=E&&E.length||0,v=v.substring(0,v.lastIndexOf("/")),w=function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+v+"$2$3")},y=!H&&x,B=0,A,C,D,z,F;if(v.length){v+="/"}if(y){H=1}for(;B<H;B++){A=0;if(y){C=x;k.push(w(G))}else{C=E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&w(RegExp.$2))}z=C.split(",");F=z.length;for(;A<F;A++){D=z[A];i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:k.length-1,minw:D.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:D.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}}j()},l,q,j=function(E){var v="clientWidth",x=r[v],D=u.compatMode==="CSS1Compat"&&x||u.body[v]||x,z={},C=u.createDocumentFragment(),B=b[b.length-1],w=(new Date()).getTime();if(E&&l&&w-l<g){clearTimeout(q);q=setTimeout(j,g);return}else{l=w}for(var y in i){var F=i[y];if(!F.minw&&!F.maxw||(!F.minw||F.minw&&D>=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[]){z[]=[]}z[].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}"GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send(null)},c=(function(){var v=false;try{v=XMLHttpRequest()}catch(w){v=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";"mq-test-1";"position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_<style media="'+a+'"> #mq-test-1 { width: 9px; }</style>';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this));
2  respond.src.js
@@ -1,4 +1,4 @@
-/*! Respond.js: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. */
+/*! Respond.js: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. */
(function( win, mqSupported ){
//exposed namespace
win.respond = {};
Something went wrong with that request. Please try again.